Serhiy Storchaka added the comment:

Yet one difference is that kwargs can be NULL in C function if no keyword 
arguments are supplied.

Here is a patch that adds tests for exact types of args and kwargs arguments in 
C functions.

I think that we should keep passing NULL as kwargs for performance reasons. But 
shouldn't we convert dict subclass to exact dict? I think there are good 
reasons to do this. Some functions can save kwargs for latter use. And this 
makes the implementation more consistent with PyPy.

If defaultdict behavior is needed for formatting, there is format_map().

----------
keywords: +patch
nosy: +serhiy.storchaka
type:  -> behavior
versions: +Python 3.5, Python 3.6 -Python 3.3, Python 3.4
Added file: http://bugs.python.org/file42742/test_args_kwargs_types.patch

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

Reply via email to