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 collections import *` doesn't fail if 'deque' isn't present (which it may not be in alternate implementations). Patch includes (small) doc and test changes. All tests pass successfully for both versions. ---------- components: Library (Lib) files: py_defaultdict_1.patch keywords: patch messages: 267276 nosy: ebarry, rhettinger priority: normal severity: normal stage: patch review status: open title: Add a pure Python version of 'collections.defaultdict' type: enhancement versions: Python 3.6 Added file: http://bugs.python.org/file43200/py_defaultdict_1.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27220> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com