57 Commits

Author SHA1 Message Date
Benjamin Peterson
0e617e22f0 remove some copyright notices supserseded by the toplevel ones 2016-01-01 11:53:47 -06:00
Benjamin Peterson
9cb33b7d03 correct defaultdict signature in docstring (closes #20250)
Patch from Andrew Barnert.
2014-01-13 23:56:05 -05:00
Raymond Hettinger
cb1d96f782 Issue #18594: Make the C code more closely match the pure python code. 2013-10-04 16:51:02 -07:00
Raymond Hettinger
224c87d60c Issue #18594: Fix the fallback path in collections.Counter(). 2013-10-01 21:36:09 -07:00
Raymond Hettinger
2ff2190b62 Issue #18594: Fix the fast path for collections.Counter().
The path wasn't being taken due to an over-restrictive type check.
2013-10-01 00:55:43 -07:00
Raymond Hettinger
986bbfc079 Backport deque.rotate() improvements. 2013-02-09 20:00:55 -05:00
Benjamin Peterson
0e5c48a917 make deque_clear void, since it's infallible 2013-01-12 21:22:18 -05:00
Andrew Svetlov
796c443f3d Merge: fix docstring for deque ctor to mark iterable parameter optional 2012-10-31 11:51:13 +02:00
Andrew Svetlov
6a5c7c341a Fix docstring for deque ctor to mark iterable parameter optional 2012-10-31 11:50:40 +02:00
Jesus Cea
1659b75189 MERGE: Closes #15469: Correct __sizeof__ support for deque 2012-08-03 14:52:12 +02:00
Jesus Cea
16e2fca47e Closes #15469: Correct __sizeof__ support for deque 2012-08-03 14:49:42 +02:00
Kristján Valur Jónsson
31668b8f7a Issue #14288: Serialization support for builtin iterators. 2012-04-03 10:49:41 +00:00
Antoine Pitrou
15af7b4a4f Issue #13015: Fix a possible reference leak in defaultdict.__repr__.
Patch by Suman Saha.
2012-02-15 02:43:47 +01:00
Antoine Pitrou
f5f1fe0cb5 Issue #13015: Fix a possible reference leak in defaultdict.__repr__.
Patch by Suman Saha.
2012-02-15 02:42:46 +01:00
Martin v. Löwis
bd928fef42 Rename _Py_identifier to _Py_IDENTIFIER. 2011-10-14 10:20:37 +02:00
Martin v. Löwis
1ee1b6fe0d Use identifier API for PyObject_GetAttrString. 2011-10-10 18:11:30 +02:00
Martin v. Löwis
afe55bba33 Add API for static strings, primarily good for identifiers.
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
2011-10-09 10:38:36 +02:00
Brian Curtin
dfc80e3d97 Replace Py_NotImplemented returns with the macro form Py_RETURN_NOTIMPLEMENTED.
The macro was introduced in #12724.
2011-08-10 20:28:54 -05:00
Victor Stinner
a154b5cea4 Simplify _count_elements() in _collections
PyIter_Next() cannot return a PyExc_StopIteration: it clears this exception.
2011-04-20 23:23:52 +02:00
Raymond Hettinger
4974705a02 Issue 11713: clarify docstring for collections.deque() 2011-03-29 17:36:31 -07:00
Raymond Hettinger
512d2cc643 Issue #11004: Repair edge case in deque.count().
(Reviewed by Georg Brandl.)

Also made similar changes to deque.reverse() though this wasn't
strictly necessary (the edge case cannot occur with two pointers
moving to meet in the middle).  Making the change in reverse()
was more a matter of future-proofing.
2011-01-25 21:32:39 +00:00
Raymond Hettinger
426e052a4f Make C helper function more closely match the pure python version, and add tests. 2011-01-03 02:12:02 +00:00
Raymond Hettinger
96f3410ebe Issue 10667: Fast path for collections.Counter 2010-12-15 16:30:37 +00:00
Georg Brandl
f038b32d0b Remove more unneeded casts to hashfunc. 2010-10-18 07:35:09 +00:00
Antoine Pitrou
554f33407c Fix <deque iterator>.__length_hint__() under 64-bit Windows. 2010-08-17 18:30:06 +00:00