4 ms·
It's hardly a magic module, collections is part of the Python standard library. https://docs.python.org/3/library/collections.html https://docs.python.org/3/lib
by aw3c2 11y ago
It's hardly a magic module, collections is part of the Python standard library. https://docs.python.org/3/library/collections.html https://docs.python.org/3/library/collections.html
- maxerickson 11y agoIt's kind of magical: https://hg.python.org/cpython/file/tip/Lib/collections/__init__.py#l284 https://hg.python.org/cpython/file/tip/Lib/collections/__ini...
- robohamburger 11y agoIf you look at the code for it you will weep. If only python had hygienic macros. I would settle for better namedtuple syntax though.
- rch 11y agoI always thought it was left as-is to further discussions about how it should be, without having to overcome a crowd of people claiming it's good enough already.