Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
f2519a59
Commit
f2519a59
authored
Aug 19, 1996
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Raise TypeError, not KeyError, on unknown keyword argument.
parent
b0d3d1b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
Python/ceval.c
Python/ceval.c
+1
-2
No files found.
Python/ceval.c
View file @
f2519a59
...
...
@@ -28,7 +28,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
XXX how to pass arguments to call_trace?
XXX totally get rid of access stuff
XXX speed up searching for keywords by using a dictionary
XXX unknown keyword shouldn't raise KeyError?
XXX document it!
*/
...
...
@@ -449,7 +448,7 @@ eval_code2(co, globals, locals,
}
if
(
j
>=
co
->
co_argcount
)
{
if
(
kwdict
==
NULL
)
{
err_setval
(
KeyError
/*XXX*/
,
keyword
);
err_setval
(
TypeError
,
keyword
);
goto
fail
;
}
mappinginsert
(
kwdict
,
keyword
,
value
);
...
...
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