[issue13887] defaultdict.get does not default to initial default but None

2012-01-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 089a086252fc by Benjamin Peterson in branch '3.2': note that get() is not affected by default_factory (closes #13887) http://hg.python.org/cpython/rev/089a086252fc New changeset 26612ad451ad by Benjamin Peterson in branch 'default': merge heads (#1

[issue13887] defaultdict.get does not default to initial default but None

2012-01-27 Thread Mark Dickinson
Mark Dickinson added the comment: It's certainly intentional behaviour: all the defaultdict does is provide a __missing__ method. And as explained in http://docs.python.org/library/stdtypes.html#mapping-types-dict "No other operations or methods invoke __missing__()." So it looks to me as

[issue13887] defaultdict.get does not default to initial default but None

2012-01-27 Thread Jörn Hees
New submission from Jörn Hees : I wanted to create a "function registrar" d using a defaultdict. The library that this registrar is passed to expects it to return functions taking 3 args. Now if the first call is d.get(x) it seems that in contrast to d[x] the default arg of get is returned (No