summaryrefslogtreecommitdiffstats
path: root/Modules/collectionsmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Improve deque iteration.Raymond Hettinger2004-03-181-1/+102
| | | | | | * The default __reversed__ performed badly, so reintroduced a custom reverse iterator. * Added length transparency to improve speed with map(), list(), etc.
* Special case endpoint access for speed.Raymond Hettinger2004-03-041-10/+18
|
* Replace left(), right(), and __reversed__() with the more general purposeRaymond Hettinger2004-03-011-123/+69
| | | | | | | __getitem__() and __setitem__(). Simplifies the API, reduces the code size, adds flexibility, and makes deques work with bisect.bisect(), random.shuffle(), and random.sample().
* Make deque_type static so namespace is not polluted.Neal Norwitz2004-02-291-2/+2
|
* Improvements to collections.deque():Raymond Hettinger2004-02-291-3/+117
| | | | | | | | * Add doctests for the examples in the library reference. * Add two methods, left() and right(), modeled after deques in C++ STL. * Apply the new method to asynchat.py. * Add comparison operators to make deques more substitutable for lists. * Replace the LookupErrors with IndexErrors to more closely match lists.
* Get rid of unused variableNeal Norwitz2004-02-281-1/+0
|
* Make deque.rotate() smarter. Beef-up related tests.Raymond Hettinger2004-02-081-4/+11
|
* * Incorporate Skip's suggestions for documentation (explain the word dequeRaymond Hettinger2004-02-071-4/+44
| | | | | comes from and show the differences from lists). * Add a rotate() method.
* * Fix ref counting in extend() and extendleft().Raymond Hettinger2004-02-071-4/+93
| | | | * Let deques support reversed().
* Have deques support high volume loads.Raymond Hettinger2004-02-061-23/+74
|
* Fix spelling.Raymond Hettinger2004-01-291-2/+2
|
* * Move collections.deque() in from the sandboxRaymond Hettinger2004-01-291-0/+582
* Add unittests, newsitem, and whatsnew * Apply to Queue.py mutex.py threading.py pydoc.py and shlex.py * Docs are forthcoming