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

2010-07-11 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Fixed in r82821 (py3k), r82823 (release27-maint) and r82824 (release31-maint). -- stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

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

2010-07-03 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@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 () ... --

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

2010-07-02 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9137 ___ ___ Python-bugs-list

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

2010-07-02 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Here's a fix. -- keywords: +patch nosy: +rhettinger Added file: http://bugs.python.org/file17834/issue9137.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9137

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

2010-07-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: And what about this? x.update(self=5) -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9137 ___

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

2010-07-02 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Ah. Good point. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9137 ___ ___

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

2010-07-02 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Updated patch, to deal with 'self' correctly too. -- stage: needs patch - patch review Added file: http://bugs.python.org/file17835/issue9137_v2.patch ___ Python tracker rep...@bugs.python.org

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

2010-07-02 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: stutzbach - mark.dickinson resolution: - accepted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9137 ___

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

2010-07-01 Thread Daniel Stutzbach
New submission from Daniel Stutzbach dan...@stutzbachenterprises.com: Simple example, using collections.OrderedDict: import collections x = collections.OrderedDict() x.update(red=5, blue=6, other=7) Traceback (most recent call last): File stdin, line 1, in module File