[issue27220] Add a pure Python version of 'collections.defaultdict'

2016-07-07 Thread Emanuel Barry
Emanuel Barry added the comment: (Also, if this is going to be rejected still, I think that fixing __all__ to only conditionally add 'deque' and 'defaultdict' should be considered) -- ___ Python tracker

[issue27220] Add a pure Python version of 'collections.defaultdict'

2016-07-07 Thread Emanuel Barry
Emanuel Barry added the comment: I agree that CPython itself gains nothing from having this, as this is so that alternate implementations have it as well. I get what you mean about the minor differences, however I think it's a good thing, as it helps to make sure the tests are precise enough

[issue27220] Add a pure Python version of 'collections.defaultdict'

2016-07-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't think there is any advantage to adding a pure python version of defaultdict (or we would have done it a long time ago). Each time we do this, it creates a host of downstream issues where people notice minor implementation differences between the

[issue27220] Add a pure Python version of 'collections.defaultdict'

2016-07-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> rhettinger ___ Python tracker ___

[issue27220] Add a pure Python version of 'collections.defaultdict'

2016-07-06 Thread Emanuel Barry
Emanuel Barry added the comment: Raymond, do you have any interest/time to review this? I can ask someone else, if you prefer. -- ___ Python tracker ___

[issue27220] Add a pure Python version of 'collections.defaultdict'

2016-06-04 Thread Emanuel Barry
New submission from Emanuel Barry: Attached patch adds a pure Python version of `collections.defaultdict`. This is yet another step in providing better support for alternate implementations, which may or may not have `_collections`. I also went ahead and fixed __all__ so that `from