summaryrefslogtreecommitdiffstats
path: root/Lib/collections
Commit message (Collapse)AuthorAgeFilesLines
* Fix minor details in the Counter docs (GH-31029) (GH-31072)Miss Islington (bot)2022-02-021-0/+4
|
* bpo-25478: Add total() method to collections.Counter (GH-25829)Raymond Hettinger2021-05-031-0/+4
|
* bpo-43245: Add keyword argument support to ChainMap.new_child() (GH-24788)Kamil Turek2021-03-141-2/+5
|
* bpo-42128: Structural Pattern Matching (PEP 634) (GH-22917)Brandt Bucher2021-02-261-0/+1
| | | | | Co-authored-by: Guido van Rossum <guido@python.org> Co-authored-by: Talin <viridia@gmail.com> Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
* bpo-43102: Set namedtuple __new__'s internal builtins to a dict. (GH-24439)Raymond Hettinger2021-02-041-1/+1
|
* bpo-37324: Remove ABC aliases from collections (GH-23754)Hugo van Kemenade2021-01-121-16/+0
| | | | Remove deprecated aliases to Abstract Base Classes from the collections module.
* bpo-42195: Ensure consistency of Callable's __args__ in collections.abc and ↵kj2020-12-131-0/+1
| | | | typing (GH-23060)
* bpo-42487: don't call __getitem__ of underlying maps in ChainMap.__iter__ ↵Andreas Poehlmann2020-11-301-1/+1
| | | | (GH-23534)
* Revert "Fix all Python Cookbook links (#22205)" (GH-22424)Andre Delfino2020-09-271-1/+1
| | | This commit reverts commit ac0333e1e117b7f61ed7ef1dbcdb6e515ada603b as the original links are working again and they provide extended features such as comments and alternative versions.
* Fix all Python Cookbook links (#22205)Andre Delfino2020-09-151-1/+1
|
* bpo-41006: collections imports lazily heap (GH-20940)Victor Stinner2020-06-171-2/+4
| | | | The collections module now imports lazily the heapq modules in the Counter.most_common() method to speedup Python startup time.
* Collections module reformatting and minor code refactoring (GH-20772)Raymond Hettinger2020-06-111-91/+271
|
* Minor improvement to the namedtuple implementation (GH-20741)Raymond Hettinger2020-06-081-1/+4
| | | | | * Cleaner way to build the arg list with a trailing comma when required * Fix appearance of __new__ in help()
* Deny eval() direct access to builtins (GH-20713)Raymond Hettinger2020-06-081-1/+2
|
* Update comments to reflect the current API (GH-20682)Raymond Hettinger2020-06-061-4/+6
|
* bpo-40755: Add rich comparisons to Counter (GH-20548)Raymond Hettinger2020-05-311-86/+36
|
* bpo-40755: Add missing multiset operations to Counter() (GH-20339)Raymond Hettinger2020-05-281-6/+104
|
* Simplify creation of the __new__ method in namedtuple() (GH-20361)Raymond Hettinger2020-05-261-4/+2
|
* Expand the implementation comments (GH-19699)Raymond Hettinger2020-04-241-0/+7
|
* bpo-39939: Add str.removeprefix and str.removesuffix (GH-18939)sweeneyde2020-04-221-0/+8
| | | | | Added str.removeprefix and str.removesuffix methods and corresponding bytes, bytearray, and collections.UserString methods to remove affixes from a string if present. See PEP 616 for a full description.
* bpo-36144: Add PEP 584 operators to collections.ChainMap (#18832)Curtis Bucher2020-03-231-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update ChainMap to include | and |= Created __ior__, __or__ and __ror__ methods in ChainMap class. * Update ACKS * Update docs * Update test_collections.py to include test_issue584(). Added testing for | and |= operators for ChainMap objects. * Update test_union_operators Renamed test_union operators, fixed errors and style problems raised by brandtbucher. * Update test_union_operators in TestChainMap Added testing for union operator between ChainMap and iterable of key-value pairs. * Update test_union operators in test_collections.py Gave more descriptive variable names and eliminated unnecessary tmp variable. * Update test_union_operators in test_collections.py Added cm3 * Check .maps rather than Chainmap equality. * Add news entry * Update Lib/test/test_collections.py Co-Authored-By: Brandt Bucher <brandtbucher@gmail.com> * Removed whitespace * Added Guido's changes * Fixed Docs * Removed whitespace Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
* bpo-36144: OrderedDict Union (PEP 584) (#18967)Brandt Bucher2020-03-131-0/+18
|
* bpo-36144: Dictionary Union (PEP 584) (#12088)Brandt Bucher2020-02-251-0/+20
|
* bpo-39674: Revert "bpo-25988: Do not expose abstract collection classes in ↵Victor Stinner2020-02-181-0/+15
| | | | | | | | the collections module. (GH-10596)" (GH-18545) This reverts commit ef092fe9905f61ca27889092ca1248a11aa74498. Update collections __getattr__() and documentation to defer aliases removal to Python 3.10.
* bpo-36321: Fix misspelled attribute name in namedtuple() (GH-16858)Raymond Hettinger2019-10-201-2/+0
|
* bpo-25988: Do not expose abstract collection classes in the collections ↵Serhiy Storchaka2019-10-071-15/+0
| | | | module. (GH-10596)
* bpo-36582: Make collections.UserString.encode() return bytes, not str (GH-13138)Daniel Fortunov2019-08-281-6/+4
|
* Add missing space to warning message (GH-14915)Florian Bruhin2019-08-221-1/+1
| | | This typo was introduced in GH-13409 when changing the message text.
* Fix typos in docs, comments and test assert messages (#14872)Min ho Kim2019-07-211-1/+1
|
* [3.9] bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-12620)Serhiy Storchaka2019-06-051-17/+1
| | | Turn deprecation warnings added in 3.8 into TypeError.
* bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-13700)Serhiy Storchaka2019-06-011-36/+10
|
* bpo-36953: Delay removal of ABCs from collections. (GH-13409)Matthias Bussonnier2019-05-301-2/+2
| | | | | | | Bump the removal to 3.9, indicate collections.abc available since 3.3, replace version-changed directive to deprecated-removed. https://bugs.python.org/issue36953
* bpo-25652: Fix __rmod__ of UserString (GH-13326)Batuhan Taşkaya2019-05-211-3/+2
| | | | | | The ``__rmod__`` method of ``collections.UserString`` class had a bug that made it unusable. https://bugs.python.org/issue25652
* bpo-27141: Fix collections.UserList and UserDict shallow copy. (GH-4094)Bar Harel2019-05-191-0/+14
|
* bpo-27639: Correct return type for UserList slicing operation (#13169)Michael Blahay2019-05-071-1/+5
| | | | | | | * BPO-27639: Correct return type for UserList slicing operation Added logic to __getitem__ magic method for UserList to ensure that the return type matches that of self.
* bpo-36542: Allow to overwrite the signature for Python functions. (GH-12705)Serhiy Storchaka2019-05-061-0/+2
|
* Have UserDict.__init__() implicitly check for updating w/ bool(kwargs) ↵Slam2019-04-021-1/+1
| | | | | instead of len() (GH-12139) Semantically the same, but more idiomatic by checking against `kwargs` instead of `len(kwargs)`.
* bpo-36321: Fix misspelled attribute in namedtuple() (GH-12375)Raymond Hettinger2019-03-181-0/+2
|
* bpo-36057 Update docs and tests for ordering in collections.Counter [no ↵Raymond Hettinger2019-02-211-2/+2
| | | | | | | | | | behavior change] (#11962) * Add tests for Counter order. No behavior change. * Update docs and tests * Fix doctest output and capitalization
* Complete and neaten-up namedtuple's replacement of builtin function lookups ↵Raymond Hettinger2019-02-081-6/+3
| | | | with derefs (GH-11794)
* bpo-35864: fix namedtuple._asdict() docstring (GH-11720)Amador Pahim2019-02-011-1/+1
|
* bpo-35864: Replace OrderedDict with regular dict in namedtuple() (#11708)Raymond Hettinger2019-01-311-1/+3
| | | | | | * Change from OrderedDict to a regular dict * Add blurb
* bpo-32492: Tweak _collections._tuplegetter. (GH-11367)Serhiy Storchaka2018-12-311-11/+2
| | | | | | * Replace the docstrings cache with sys.intern(). * Improve tests. * Unify names of tp_descr_get and tp_descr_set functions.
* bpo-32492: 1.6x speed up in namedtuple attribute access using C fast-path ↵Pablo Galindo2018-12-301-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#10495) * bpo-32492: 2.5x speed up in namedtuple attribute access using C fast path * Add News entry * fixup! bpo-32492: 2.5x speed up in namedtuple attribute access using C fast path * Check for tuple in the __get__ of the new descriptor and don't cache the descriptor itself * Don't inherit from property. Implement GC methods to handle __doc__ * Add a test for the docstring substitution in descriptors * Update NEWS entry to reflect time against 3.7 branch * Simplify implementation with argument clinic, better error messages, only __new__ * Use positional-only parameters for the __new__ * Use PyTuple_GET_SIZE and PyTuple_GET_ITEM to tighter the implementation of tuplegetterdescr_get * Implement __set__ to make tuplegetter a data descriptor * Use Py_INCREF now that we inline PyTuple_GetItem * Apply the valid_index() function, saving one test * Move Py_None test out of the critical path.
* Clarify that example in comment is about fromkeys() (GH-8141)Raymond Hettinger2018-07-061-1/+1
|
* Add more detail to the Counter.fromkeys() comment block (GH-8124)Raymond Hettinger2018-07-051-2/+7
|
* Code beautification using f-strings (#5618)Raymond Hettinger2018-02-111-2/+1
|
* bpo-32792: Preserve mapping order in ChainMap() (GH-5586)Raymond Hettinger2018-02-111-1/+4
|
* bpo-25988: Emit a warning when use or import ABCs from 'collections'. (#5460)Serhiy Storchaka2018-01-311-21/+27
|
* bpo-25988: Deprecate exposing collections.abc in collections GH-5414Raymond Hettinger2018-01-291-3/+7
|