[issue9137] x.update(red=5, blue=6, other=7) doesn't work, where x is a MutableMapping

Alexander Belopolsky report at bugs.python.org
Sat Jul 3 20:17:54 CEST 2010


Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

Just a nitpick: I think the code will be clearer if you switch on args' length rather than catch IndexError:


nargs = len(args)
if nargs > 2:
   ...

self = args[0]
other = args[1] if nargs == 2 else ()
...

----------
nosy: +belopolsky

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9137>
_______________________________________


More information about the Python-bugs-list mailing list