Commit Graph

44 Commits

Author SHA1 Message Date
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
Raymond Hettinger 50105d3840 Improve readability by replacing '\n' in template with real newlines. 2011-03-22 13:34:03 -07:00
Raymond Hettinger c46759ad0b Issue #11333: Add __slots__ to the collections ABCs. 2011-03-22 11:46:25 -07:00
Ezio Melotti 373089239b #11515: Merge with 3.2. 2011-03-15 06:03:08 +02:00
Eli Bendersky 9479d1ade8 Issue #11388: Added a clear() method to MutableSequence 2011-03-04 05:34:58 +00:00
Raymond Hettinger d032131dcb Add __bool__ method. Add tests. Fix-up broken test. 2011-02-26 06:53:58 +00:00
Raymond Hettinger 9fe1ccfb5a Issue #11297: Add collections.ChainMap() 2011-02-26 01:02:51 +00:00
Eli Bendersky cbbaa96036 Issue #10516: adding list.clear() and list.copy() methods 2011-02-25 05:47:53 +00:00
Raymond Hettinger 499e19340e Add tests for the _ChainMap helper class. 2011-02-23 07:56:53 +00:00
Raymond Hettinger c9423109f5 Factor-out common code for helper classes. 2011-02-22 01:55:36 +00:00
Raymond Hettinger 158c9c26fc Issue #11085: Moved collections abstract base classes into a separate module
called collections.abc, following the pattern used by importlib.abc.  For
backwards compatibility, the names continue to also be imported into the
collections module.
2011-02-22 00:41:50 +00:00