Tal Einat added the comment:

In general, that sounds like a reasonable suggestion to me. A quick search 
shows that most classes that call _PyArg_NoKeywords check the type first. I 
think we should strive for uniformity in this respect, so I'm +1 for your 
suggestion.

I do see some classes which accept only positional arguments but where that 
check isn't in place. Examples:

* itertools.tee just calls PyArg_ParseTuple without checking _PyArg_NoKeywords 
(is this a bug?) (this is fairly common, I think)

* range always calls _PyArg_NoKeywords, without checking the type (is this a 
bug?) (this is rare)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20385>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to