Message277860
Here is a patch with smaller (in comparison with issue27358) change for 3.5 that improves error message when pass a non-mapping as second var-keyword argument.
Unpatched:
>>> f(**{'a': 1}, **[])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'list' object is not a mapping
>>> f(**{'a': 1}, **0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'int' object is not iterable
Patched:
>>> f(**{'a': 1}, **[])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: f() argument after ** must be a mapping, not list
>>> f(**{'a': 1}, **0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: f() argument after ** must be a mapping, not int |
|
Date |
User |
Action |
Args |
2016-10-02 08:37:57 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, vstinner, larry, ned.deily, kayhayen, python-dev, Demur Rumed |
2016-10-02 08:37:57 | serhiy.storchaka | set | messageid: <1475397477.48.0.468257215173.issue28257@psf.upfronthosting.co.za> |
2016-10-02 08:37:57 | serhiy.storchaka | link | issue28257 messages |
2016-10-02 08:37:57 | serhiy.storchaka | create | |
|