[issue32135] Dict creation with update will result to NoneType

Eric V. Smith report at bugs.python.org
Sat Nov 25 18:07:44 EST 2017


Eric V. Smith <eric at trueblade.com> added the comment:

dict.update() returns None, so this is expected. Maybe you want:

>>> x = {"X":123}
>>> x.update({"abc":123})
>>> x
{'X': 123, 'abc': 123}
>>>

----------
nosy: +eric.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32135>
_______________________________________


More information about the Python-bugs-list mailing list