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
df0ff793
Commit
df0ff793
authored
Oct 28, 2008
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more call tests with keywords
parent
0cd778f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
tests/run/callargs.pyx
tests/run/callargs.pyx
+11
-1
No files found.
tests/run/callargs.pyx
View file @
df0ff793
...
...
@@ -100,6 +100,17 @@ __doc__ = u"""
1 2 0 0
>>> d(1,2,3)
1 2 1 0
>>> d(key=None)
Traceback (most recent call last):
TypeError: d() takes at least 1 positional argument (0 given)
>>> d(1, key=None)
1 1 0 1
>>> d(1,2, key=None)
1 2 0 1
>>> d(1,2,3, key=None)
1 2 1 1
"""
def
d
(
a
,
b
=
1
,
*
args
,
**
kwds
):
...
...
@@ -125,7 +136,6 @@ if sys.version_info[0] >= 3:
else
:
kwargs
=
{
"test"
:
u"toast"
}
def
test_kw_args
(
f
):
f
(
1
,
2
,
c
=
3
)
f
(
1
,
2
,
d
=
3
,
*
args
)
...
...
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