Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | gh-108751: Add copy.replace() function (GH-108752) | Serhiy Storchaka | 2023-09-06 | 1 | -0/+1 |
| | | | | | | | | | It creates a modified copy of an object by calling the object's __replace__() method. It is a generalization of dataclasses.replace(), named tuple's _replace() method and replace() methods in various classes, and supports all these stdlib classes. | ||||
* | gh-105736: Sync pure python version of OrderedDict with the C version (#108098) | Raymond Hettinger | 2023-08-21 | 1 | -7/+9 |
| | |||||
* | gh-91896: Revert some very noisy DeprecationWarnings for `ByteString` (#104424) | Alex Waygood | 2023-05-13 | 1 | -9/+0 |
| | |||||
* | gh-91896: Improve visibility of `ByteString` deprecation warnings (#104294) | Alex Waygood | 2023-05-12 | 1 | -0/+9 |
| | |||||
* | gh-103092: Isolate `_collections` (#103093) | Erlend E. Aasland | 2023-04-12 | 1 | -0/+5 |
| | | | Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> | ||||
* | gh-101446: Change `repr` of `collections.OrderedDict` (#101661) | Nikita Sobolev | 2023-02-08 | 1 | -1/+1 |
| | |||||
* | gh-86682: Adds sys._getframemodulename as an alternative to using _getframe ↵ | Steve Dower | 2023-01-13 | 1 | -3/+6 |
| | | | | | (GH-99520) Also updates calls in collections, doctest, enum, and typing modules to use _getframemodulename first when available. | ||||
* | GH-98766: Modest speed-up from ChainMap.__iter__ (GH-98946) | Raymond Hettinger | 2022-11-01 | 1 | -2/+2 |
| | |||||
* | bpo-39264: Fix UserDict.get() to account for __missing__() (GH-17910) | Bar Harel | 2022-05-10 | 1 | -1/+8 |
| | | | | | | Here's the patch according to the discussion at the [Python-Dev mailing list](https://mail.python.org/archives/list/python-dev@python.org/thread/SDXOEMAEM6KQ3CQCJVBVRT5QNSPAVU6X/). UserDict.get() will match dict's behavior and not call `__missing__`. Automerge-Triggered-By: GH:rhettinger | ||||
* | bpo-26579: Add object.__getstate__(). (GH-2821) | Serhiy Storchaka | 2022-04-06 | 1 | -4/+16 |
| | | | | | | | Copying and pickling instances of subclasses of builtin types bytearray, set, frozenset, collections.OrderedDict, collections.deque, weakref.WeakSet, and datetime.tzinfo now copies and pickles instance attributes implemented as slots. | ||||
* | Fix minor details in the Counter docs (GH-31029) | Raymond Hettinger | 2022-02-02 | 1 | -0/+4 |
| | |||||
* | Minor code rearrangement to group related methods together. (GH-30813) | Raymond Hettinger | 2022-01-23 | 1 | -40/+38 |
| | | | | * Make example more focused with math.prod() * Move comparison tests to the multiset operations section | ||||
* | bpo-27275: Change popitem() and pop() methods of collections.OrderedDict ↵ | Serhiy Storchaka | 2021-08-03 | 1 | -4/+12 |
| | | | | | | | | | | | | | | | | | (GH-27530) * Unify the C and Python implementations of OrderedDict.popitem(). The C implementation no longer calls ``__getitem__`` and ``__delitem__`` methods of the OrderedDict subclasses. * Change popitem() and pop() methods of collections.OrderedDict For consistency with dict both implementations (pure Python and C) of these methods in OrderedDict no longer call __getitem__ and __delitem__ methods of the OrderedDict subclasses. Previously only the Python implementation of popitem() did not call them. | ||||
* | bpo-25478: Add total() method to collections.Counter (GH-25829) | Raymond Hettinger | 2021-05-03 | 1 | -0/+4 |
| | |||||
* | bpo-43245: Add keyword argument support to ChainMap.new_child() (GH-24788) | Kamil Turek | 2021-03-14 | 1 | -2/+5 |
| | |||||
* | bpo-42128: Structural Pattern Matching (PEP 634) (GH-22917) | Brandt Bucher | 2021-02-26 | 1 | -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 Hettinger | 2021-02-04 | 1 | -1/+1 |
| | |||||
* | bpo-37324: Remove ABC aliases from collections (GH-23754) | Hugo van Kemenade | 2021-01-12 | 1 | -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 ↵ | kj | 2020-12-13 | 1 | -0/+1 |
| | | | | typing (GH-23060) | ||||
* | bpo-42487: don't call __getitem__ of underlying maps in ChainMap.__iter__ ↵ | Andreas Poehlmann | 2020-11-30 | 1 | -1/+1 |
| | | | | (GH-23534) | ||||
* | Revert "Fix all Python Cookbook links (#22205)" (GH-22424) | Andre Delfino | 2020-09-27 | 1 | -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 Delfino | 2020-09-15 | 1 | -1/+1 |
| | |||||
* | bpo-41006: collections imports lazily heap (GH-20940) | Victor Stinner | 2020-06-17 | 1 | -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 Hettinger | 2020-06-11 | 1 | -91/+271 |
| | |||||
* | Minor improvement to the namedtuple implementation (GH-20741) | Raymond Hettinger | 2020-06-08 | 1 | -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 Hettinger | 2020-06-08 | 1 | -1/+2 |
| | |||||
* | Update comments to reflect the current API (GH-20682) | Raymond Hettinger | 2020-06-06 | 1 | -4/+6 |
| | |||||
* | bpo-40755: Add rich comparisons to Counter (GH-20548) | Raymond Hettinger | 2020-05-31 | 1 | -86/+36 |
| | |||||
* | bpo-40755: Add missing multiset operations to Counter() (GH-20339) | Raymond Hettinger | 2020-05-28 | 1 | -6/+104 |
| | |||||
* | Simplify creation of the __new__ method in namedtuple() (GH-20361) | Raymond Hettinger | 2020-05-26 | 1 | -4/+2 |
| | |||||
* | Expand the implementation comments (GH-19699) | Raymond Hettinger | 2020-04-24 | 1 | -0/+7 |
| | |||||
* | bpo-39939: Add str.removeprefix and str.removesuffix (GH-18939) | sweeneyde | 2020-04-22 | 1 | -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 Bucher | 2020-03-23 | 1 | -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 Bucher | 2020-03-13 | 1 | -0/+18 |
| | |||||
* | bpo-36144: Dictionary Union (PEP 584) (#12088) | Brandt Bucher | 2020-02-25 | 1 | -0/+20 |
| | |||||
* | bpo-39674: Revert "bpo-25988: Do not expose abstract collection classes in ↵ | Victor Stinner | 2020-02-18 | 1 | -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 Hettinger | 2019-10-20 | 1 | -2/+0 |
| | |||||
* | bpo-25988: Do not expose abstract collection classes in the collections ↵ | Serhiy Storchaka | 2019-10-07 | 1 | -15/+0 |
| | | | | module. (GH-10596) | ||||
* | bpo-36582: Make collections.UserString.encode() return bytes, not str (GH-13138) | Daniel Fortunov | 2019-08-28 | 1 | -6/+4 |
| | |||||
* | Add missing space to warning message (GH-14915) | Florian Bruhin | 2019-08-22 | 1 | -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 Kim | 2019-07-21 | 1 | -1/+1 |
| | |||||
* | [3.9] bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-12620) | Serhiy Storchaka | 2019-06-05 | 1 | -17/+1 |
| | | | Turn deprecation warnings added in 3.8 into TypeError. | ||||
* | bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-13700) | Serhiy Storchaka | 2019-06-01 | 1 | -36/+10 |
| | |||||
* | bpo-36953: Delay removal of ABCs from collections. (GH-13409) | Matthias Bussonnier | 2019-05-30 | 1 | -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şkaya | 2019-05-21 | 1 | -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 Harel | 2019-05-19 | 1 | -0/+14 |
| | |||||
* | bpo-27639: Correct return type for UserList slicing operation (#13169) | Michael Blahay | 2019-05-07 | 1 | -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 Storchaka | 2019-05-06 | 1 | -0/+2 |
| | |||||
* | Have UserDict.__init__() implicitly check for updating w/ bool(kwargs) ↵ | Slam | 2019-04-02 | 1 | -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 Hettinger | 2019-03-18 | 1 | -0/+2 |
| |