Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
cython
Commits
bcb92075
Commit
bcb92075
authored
Mar 30, 2008
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge
parent
7199b302
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
18 deletions
+14
-18
Demos/Setup.py
Demos/Setup.py
+2
-1
runtests.py
runtests.py
+6
-2
tests/run/unpacklistcomp.pyx
tests/run/unpacklistcomp.pyx
+6
-15
No files found.
Demos/Setup.py
View file @
bcb92075
...
@@ -16,7 +16,7 @@ setup(
...
@@ -16,7 +16,7 @@ setup(
# Extension("inherit_bug", ["inherit_bug.pyx"]),
# Extension("inherit_bug", ["inherit_bug.pyx"]),
Extension
(
"override"
,
[
"override.pyx"
]),
Extension
(
"override"
,
[
"override.pyx"
]),
Extension
(
"cond"
,
[
"cond.pyx"
]),
Extension
(
"cond"
,
[
"cond.pyx"
]),
Extension
(
"submodule.test"
,
[
"submodule/test.pyx"
]),
#
Extension("submodule.test", ["submodule/test.pyx"]),
Extension
(
"errors"
,
[
"errors.pyx"
]),
Extension
(
"errors"
,
[
"errors.pyx"
]),
Extension
(
"cpdef"
,
[
"cpdef.pyx"
]),
Extension
(
"cpdef"
,
[
"cpdef.pyx"
]),
Extension
(
"range"
,
[
"range.pyx"
]),
Extension
(
"range"
,
[
"range.pyx"
]),
...
@@ -24,6 +24,7 @@ setup(
...
@@ -24,6 +24,7 @@ setup(
Extension
(
"ints"
,
[
"ints.pyx"
]),
Extension
(
"ints"
,
[
"ints.pyx"
]),
Extension
(
"clear"
,
[
"clear.pyx"
]),
Extension
(
"clear"
,
[
"clear.pyx"
]),
Extension
(
"detect_override"
,
[
"detect_override.pyx"
]),
Extension
(
"detect_override"
,
[
"detect_override.pyx"
]),
Extension
(
"fixes"
,
[
"fixes.pyx"
]),
],
],
cmdclass
=
{
'build_ext'
:
build_ext
},
cmdclass
=
{
'build_ext'
:
build_ext
},
# include_dirs = "/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/"
# include_dirs = "/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/"
...
...
runtests.py
View file @
bcb92075
...
@@ -2,8 +2,12 @@
...
@@ -2,8 +2,12 @@
import
os
,
sys
,
unittest
,
doctest
import
os
,
sys
,
unittest
,
doctest
from
Cython.Distutils.build_ext
import
build_ext
#from Cython.Distutils.build_ext import build_ext
from
Cython.Distutils.extension
import
Extension
#from Cython.Distutils.extension import Extension
from
distutils.extension
import
Extension
from
Cython.Distutils
import
build_ext
from
distutils.dist
import
Distribution
from
distutils.dist
import
Distribution
distutils_distro
=
Distribution
()
distutils_distro
=
Distribution
()
...
...
tests/run/unpacklistcomp.pyx
View file @
bcb92075
__doc__
=
"""
__doc__
=
"""
>>> unpack_normal([1,2])
>>> unpack_normal([1,2])
(1, 2)
(1, 2)
>>> unpack_normal([1,2,3])
>>> unpack_normal([1,2,3])
# doctest: +ELLIPSIS
Traceback (most recent call last):
Traceback (most recent call last):
ValueError: too many values to unpack
ValueError: ...
>>> unpack_normal([1])
Traceback (most recent call last):
ValueError: need more than 1 values to unpack
>>> unpack_comp([1,2])
>>> unpack_comp([1,2])
(1, 2)
(1, 2)
>>> unpack_comp([1,2,3])
>>> unpack_comp([1,2,3]) # doctest: +ELLIPSIS
Traceback (most recent call last):
ValueError: too many values to unpack
>>> unpack_comp([1])
Traceback (most recent call last):
Traceback (most recent call last):
ValueError:
need more than 1 values to unpack
ValueError:
...
>>> unpack_expr([1,2])
>>> unpack_expr([1,2])
(1, 4)
(1, 4)
>>> unpack_expr([1,2,3])
>>> unpack_expr([1,2,3]) # doctest: +ELLIPSIS
Traceback (most recent call last):
ValueError: too many values to unpack
>>> unpack_expr([1])
Traceback (most recent call last):
Traceback (most recent call last):
ValueError:
need more than 1 values to unpack
ValueError:
...
"""
"""
def
unpack_normal
(
l
):
def
unpack_normal
(
l
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment