Guido van Rossum
840c310a25
Fix typo on MutableSequence docstring.
2013-07-25 11:55:41 -07:00
Brett Cannon
cd171c8e92
Issue #18200 : Back out usage of ModuleNotFoundError (8d28d44f3a9a)
2013-07-04 17:43:24 -04:00
Brett Cannon
0a140668fa
Issue #18200 : Update the stdlib (except tests) to use
...
ModuleNotFoundError.
2013-06-13 20:57:26 -04:00
Serhiy Storchaka
3ee6dabf5b
Issue #17900 : Allowed pickling of recursive OrderedDicts. Decreased pickled
...
size and pickling time.
2013-05-21 12:47:57 +03:00
Raymond Hettinger
163e9821b4
Undo the deprecation of _asdict().
...
Backed out changeset c4ca39bece9d
2013-05-18 00:05:20 -07:00
Raymond Hettinger
4e0172fd9a
Deprecate nametuple._asdict()
2013-05-17 17:14:27 -07:00
Raymond Hettinger
8c03d832b3
merge
2013-05-17 16:43:58 -07:00
Raymond Hettinger
587d3bf78a
Update docstring for _asdict() to indicate it is obsolete.
...
Use the cleaner looking @property style for __dict__.
Move _replace() to be just after make() to indicate that
it is a core method on named tuples.
2013-05-17 16:43:14 -07:00
Raymond Hettinger
5c71079d06
merge
2013-05-17 02:29:27 -07:00
Raymond Hettinger
b37706f306
Remove unnecessary exception handler.
2013-05-17 02:28:33 -07:00
Richard Oudkerk
7a3dae056d
Issue #15528 : Add weakref.finalize to support finalization using
...
weakref callbacks.
This is 2e446e87ac5b except that collections/__init__.py has been
modified to import proxy from _weakref instead of weakref. This
eliminates an import cycle which seems to cause a problem on Unix but
not Windows.
2013-05-05 23:05:00 +01:00
Raymond Hettinger
4072875dcb
merge
2013-05-03 02:41:02 -07:00
Raymond Hettinger
b98dcc1f53
Issue #15535 : Fix pickling of named tuples.
2013-05-03 02:24:15 -07:00
Raymond Hettinger
bb25b6fc94
merge
2013-03-24 15:21:57 -07:00
Raymond Hettinger
153866ea9a
Add missing docstrings to the collections ABCs
2013-03-24 15:20:29 -07:00
Raymond Hettinger
325dc887ca
Backport improved dict comparison logic
2013-03-23 06:34:19 -07:00
Raymond Hettinger
a35e281200
Merge
2013-03-01 23:51:26 -08:00
Raymond Hettinger
4f4ba16677
Issue #17331 : Use isidentifier() instead of isalnum() to check for valid identifiers.
2013-03-01 23:43:48 -08:00
Vinay Sajip
1ba81ee19a
Closes #16613 : Added optional mapping argument to ChainMap.new_child.
2013-01-11 23:39:53 +00:00
Raymond Hettinger
527507d72e
Improve OrderedDict equality test.
2012-12-07 10:18:22 -08:00
Andrew Svetlov
73ee816d05
Merge issue #16373 : Prevent infinite recursion for ABC Set class operations.
...
Patch by Serhiy Storchaka.
2012-11-01 13:31:31 +02:00
Andrew Svetlov
b904e4256e
Merge issue #16373 : Prevent infinite recursion for ABC Set class operations.
...
Patch by Serhiy Storchaka.
2012-11-01 13:31:12 +02:00
Philip Jenvey
4993cc0a5b
utilize yield from
2012-10-01 12:53:43 -07:00
Raymond Hettinger
1c2018c311
Small cleanup and optimization
2012-06-09 22:51:39 -07:00
Raymond Hettinger
80ed4d4774
Minor reformatting (wrap fat lines, etc.) and create an __main__ file
2012-06-09 18:46:45 -07:00
Victor Stinner
7b17a4e117
Close #14386 : Register types.MappingProxyType as a Mapping
2012-04-20 01:41:36 +02:00
Raymond Hettinger
02184282c7
Clarify that the purpose of computing all the miscellaneous collection types is to register them with the appropriate ABCs.
2012-04-05 13:31:12 -07:00
Raymond Hettinger
4fd3f0c850
Merge
2012-01-26 00:15:07 -08:00
Raymond Hettinger
f1182cd4db
Merge
2011-11-05 13:39:57 -07:00
Raymond Hettinger
becd56822a
Issue #13121 : Support in-place math operators for collections.Counter().
2011-10-19 13:40:37 -07:00
Ezio Melotti
d8b509b192
#13012 : use splitlines(keepends=True/False) instead of splitlines(0/1).
2011-09-28 17:37:55 +03:00
Benjamin Peterson
c92f6226d7
add ChainMap to __all__ ( closes #12959 )
...
Thanks July Tikhonov.
2011-09-11 12:55:34 -04:00
Raymond Hettinger
fcb393c018
Add support for unary plus and unary minus to collections.Counter()
2011-08-09 13:00:40 -07:00
Raymond Hettinger
22cc1183a3
merge
2011-06-02 23:49:44 -07:00
Raymond Hettinger
1c7b7f7fbe
Userlist.copy() wasn't returning a UserList.
2011-05-05 14:34:35 -07:00
Raymond Hettinger
a82aa55b5e
Minor clean-ups to docstrings, comments, and var names.
2011-04-24 14:34:26 -07:00
Raymond Hettinger
4f438b7b00
Minor text rearrangement.
2011-04-20 13:09:46 -07:00
Raymond Hettinger
f48ac3001a
Issue #11875 : Alter the previous fix to work better with subclasses
2011-04-19 17:19:11 -07:00
Raymond Hettinger
98c850a398
Issue 11875: Keep OrderedDict's __reduce__ from temporarily mutating the object.
2011-04-19 11:04:44 -07:00
Raymond Hettinger
90375bc7c0
Rework multiset methods to use less memory and to make fewer calls to __hash__.
2011-04-17 19:49:29 -07:00
Raymond Hettinger
b5a40d4d3f
Fix minor subclassing issue with collections.Counter
2011-04-15 13:23:01 -07:00
Raymond Hettinger
f6d3e8eaef
Add tests for _source to importable and exec'able.
...
Move __name__ back out of the template; the responsibility
for setting __name__ lies with the caller (which knows
something about the new namespace), not with the class
definition (which doesn't know about the namespace it is
being built in).
2011-03-23 20:33:30 -07:00
Raymond Hettinger
15d0c1d073
Minor clean-ups.
2011-03-23 14:38:39 -07:00
Raymond Hettinger
2ebea41d31
Expose the namedtuple source with a _source attribute.
2011-03-23 12:52:23 -07:00
Raymond Hettinger
843a751369
Move namespace setup inside the template.
2011-03-23 11:49:56 -07:00
Raymond Hettinger
b2d0945c87
Minor named tuple clean-ups.
2011-03-22 22:36:21 -07:00
Raymond Hettinger
fef854602b
Factor-out named tuple class definition template strings.
2011-03-22 21:14:41 -07:00
Raymond Hettinger
74b015e243
Clean-up whitespace.
2011-03-22 14:22:52 -07:00
Raymond Hettinger
3e82ae0aae
Replace **locals() with explicit field names.
2011-03-22 14:21:38 -07:00
Raymond Hettinger
9a3f4cbfc3
Simplify the named tuple template by using the new string format syntax.
2011-03-22 14:07:23 -07:00