Commit Graph

110 Commits

Author SHA1 Message Date
Ivan Levkivskyi
0442de5ad7 bpo-25988: Emit a warning when use or import ABCs from 'collections'. (GH-5734) 2018-02-18 17:40:59 +00:00
Miss Islington (bot)
170b3f7950 bpo-32792: Preserve mapping order in ChainMap() (GH-5586) (#GH-5617)
(cherry picked from commit 3793f95f98)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2018-02-11 01:09:52 -08:00
Raymond Hettinger
e6d342156d bpo-25988: Deprecate exposing collections.abc in collections GH-5414 2018-01-29 08:27:49 -08:00
INADA Naoki
a49ac99029 bpo-32677: Add .isascii() to str, bytes and bytearray (GH-5342) 2018-01-27 14:06:21 +09:00
Raymond Hettinger
3948207c61 bpo-32320: Add default value support to collections.namedtuple() (#4859) 2018-01-10 21:45:19 -08:00
Raymond Hettinger
8b57d73639 bpo-28638: Optimize namedtuple() creation time by minimizing use of exec() (#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
2017-09-10 10:23:36 -07:00
Jonathan Eunice
faa57cbe70 bpo-30662: fixed OrderedDict.__init__ docstring re PEP 468 (#2179)
* 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
2017-09-05 16:23:49 -07:00
Serhiy Storchaka
78d9e58f20 Issues #29311, #29289: Fixed and improved docstrings for dict and OrderedDict
methods.
2017-01-25 00:30:04 +02:00
Raymond Hettinger
a67619ec5f merge 2016-12-31 12:02:42 -07:00
Raymond Hettinger
b46ea90343 Issue #29119: Fix weakref in OrderedDict.move_to_end(). Work by Andra Bogildea. 2016-12-31 12:01:59 -07:00
Raymond Hettinger
0d5048cb21 Issue #17941: Add a *module* parameter to collections.namedtuple() 2016-09-12 00:18:31 -07:00
Raymond Hettinger
dc65c68524 Remove main section that was only used during testing and development 2016-08-21 20:52:26 -07:00
Raymond Hettinger
8579a8fd63 Minor readability tweak 2016-08-17 00:46:48 -07:00
Raymond Hettinger
6538b430cf Issue #25628: Make namedtuple "rename" and "verbose" parameters keyword-only. 2016-08-16 10:55:43 -07:00
Martin Panter
e501a93c18 Issue #27125: Merge typo fixes from 3.5
Also merge changes from Issue #27117; no actual code changes to 3.6.
2016-05-29 09:05:06 +00:00
Martin Panter
8d56c026a5 Issue #27125: Fix various errors like “will [be] inherited” 2016-05-29 04:13:35 +00:00
Martin Panter
3e04d5b306 Issue #27076: Merge spelling from 3.5 2016-05-26 06:03:19 +00:00
Martin Panter
46f50726a0 Issue #27076: Doc, comment and tests spelling fixes
Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
2016-05-26 05:35:26 +00:00
Raymond Hettinger
62bc321819 Fix out-of-date comment 2016-02-25 00:25:45 -08:00
Raymond Hettinger
2831b383e9 merge 2015-11-23 21:04:53 -08:00
Raymond Hettinger
c3f7d1753f Fix non-ascii character 2015-11-23 21:03:09 -08:00
Raymond Hettinger
a89013d930 merge 2015-11-23 20:43:56 -08:00
Raymond Hettinger
c9c3dd87c1 Add a missing docstring 2015-11-23 20:43:28 -08:00
Serhiy Storchaka
5527cf119d Issue #22609: Constructor of collections.UserDict now accepts the self keyword
argument.
2015-09-29 23:38:34 +03:00
Serhiy Storchaka
f4ee1c23e8 Issue #22609: Constructor of collections.UserDict now accepts the self keyword
argument.
2015-09-29 23:37:09 +03:00