summaryrefslogtreecommitdiffstats
path: root/Lib/collections
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* bpo-32677: Add .isascii() to str, bytes and bytearray (GH-5342)INADA Naoki2018-01-271-0/+1
|
* bpo-32320: Add default value support to collections.namedtuple() (#4859)Raymond Hettinger2018-01-111-3/+17
|
* bpo-28638: Optimize namedtuple() creation time by minimizing use of exec() ↵Raymond Hettinger2017-09-101-77/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#3454) * Working draft without _source * Re-use itemgetter() instances * Speed-up calls to __new__() with a pre-bound tuple.__new__() * Add note regarding string interning * Remove unnecessary create function wrappers * Minor sync-ups with PR-2736. Mostly formatting and f-strings * Bring-in qualname/__module fix-ups from PR-2736 * Formally remove the verbose flag and _source attribute * Restore a test of potentially problematic field names * Restore kwonly_args test but without the verbose option * Adopt Inada's idea to reuse the docstrings for the itemgetters * Neaten-up a bit * Add news blurb * Serhiy pointed-out the need for interning * Jelle noticed as missing f on an f-string * Add whatsnew entry for feature removal * Accede to request for dict literals instead keyword arguments * Leave the method.__module__ attribute pointing the actual location of the code * Improve variable names and add a micro-optimization for an non-public helper function * Simplify by in-lining reuse_itemgetter() * Arrange steps in more logical order * Save docstring in local cache instead of interning
* bpo-30662: fixed OrderedDict.__init__ docstring re PEP 468 (#2179)Jonathan Eunice2017-09-051-3/+1
| | | | | | | | | | | | * fixed OrderedDict.__init__ docstring re PEP 468 * tightened comment and mirrored to C impl * added space after period per marco-buttu * preserved substituted for stable * drop references to Python 3.6 and PEP 468
* Issues #29311, #29289: Fixed and improved docstrings for dict and OrderedDictSerhiy Storchaka2017-01-241-10/+9
| | | | methods.
* mergeRaymond Hettinger2016-12-311-2/+5
|\
| * Issue #29119: Fix weakref in OrderedDict.move_to_end(). Work by Andra Bogildea.Raymond Hettinger2016-12-311-2/+5
| |
* | Issue #17941: Add a *module* parameter to collections.namedtuple()Raymond Hettinger2016-09-121-6/+10
| |
* | Remove main section that was only used during testing and developmentRaymond Hettinger2016-08-221-38/+0
| |
* | Minor readability tweakRaymond Hettinger2016-08-171-1/+1
| |
* | Issue #25628: Make namedtuple "rename" and "verbose" parameters keyword-only.Raymond Hettinger2016-08-161-1/+1
| |
* | Issue #27125: Merge typo fixes from 3.5Martin Panter2016-05-291-1/+2
|\ \ | |/ | | | | Also merge changes from Issue #27117; no actual code changes to 3.6.
| * Issue #27125: Fix various errors like “will [be] inherited”Martin Panter2016-05-291-1/+2
| |
* | Issue #27076: Merge spelling from 3.5Martin Panter2016-05-261-1/+1
|\ \ | |/
| * Issue #27076: Doc, comment and tests spelling fixesMartin Panter2016-05-261-1/+1
| | | | | | | | Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
* | Fix out-of-date commentRaymond Hettinger2016-02-251-1/+1
| |
* | mergeRaymond Hettinger2015-11-241-1/+1
|\ \ | |/
| * Fix non-ascii characterRaymond Hettinger2015-11-241-1/+1
| |
* | mergeRaymond Hettinger2015-11-241-0/+16
|\ \ | |/
| * Add a missing docstringRaymond Hettinger2015-11-241-0/+16
| |
* | Issue #22609: Constructor of collections.UserDict now accepts the self keywordSerhiy Storchaka2015-09-291-1/+16
|\ \ | |/ | | | | argument.
| * Issue #22609: Constructor of collections.UserDict now accepts the self keywordSerhiy Storchaka2015-09-291-1/+16
| |\ |/ / | | | | argument.
| * Issue #22609: Constructor of collections.UserDict now accepts the self keywordSerhiy Storchaka2015-09-291-1/+16
| | | | | | | | argument.
* | mergeRaymond Hettinger2015-09-081-3/+2
|\ \ | |/
| * Fix whitespace in comment.Raymond Hettinger2015-09-081-3/+2
| |
* | mergeRaymond Hettinger2015-08-301-10/+1
|\ \ | |/
| * Issue #24931: Resolve __dict__ conflict in namedtuple subclasses.Raymond Hettinger2015-08-301-10/+1
| |
* | Issue #23509: Speed up Counter operatorsRaymond Hettinger2015-05-301-2/+10
| | | | | | | | (Based on patch by Serhiy Storchaka.)
* | Issue #16991: Add a C implementation of collections.OrderedDict.Eric Snow2015-05-301-2/+19
| |
* | Issue 22189: Add missing methods to UserStringRaymond Hettinger2015-05-221-0/+10
| |
* | Issue 23704: Add index(), copy(), and insert() to deques. Register deques ↵Raymond Hettinger2015-03-211-0/+2
| | | | | | | | as a MutableSequence.