summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_deque.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove unnecessary line.Raymond Hettinger2004-08-261-1/+0
|
* * balance the left/right search for getitem.Raymond Hettinger2004-07-091-4/+31
| | | | | * use assertions instead of tests after internal calls that can't fail. * expand test coverage
* Make sets and deques weak referencable.Raymond Hettinger2004-05-301-0/+7
|
* SF patch #872326: Generator expression implementationRaymond Hettinger2004-05-191-1/+1
| | | | | | | | | | | | | | (Code contributed by Jiwon Seo.) The documentation portion of the patch is being re-worked and will be checked-in soon. Likewise, PEP 289 will be updated to reflect Guido's rationale for the design decisions on binding behavior (as described in in his patch comments and in discussions on python-dev). The test file, test_genexps.py, is written in doctest format and is meant to exercise all aspects of the the patch. Further additions are welcome from everyone. Please stress test this new feature as much as possible before the alpha release.
* Make sure "del d[n]" is properly supported. Was necessary because theRaymond Hettinger2004-05-121-3/+14
| | | | | | same method that implements __setitem__ also implements __delitem__. Also, there were several good use cases (removing items from a queue and implementing Forth style stack ops).
* Temporarily disable doctest until genexps are in CVSRaymond Hettinger2004-05-101-1/+1
|
* Add more examples.Raymond Hettinger2004-05-091-0/+51
|
* Replace left(), right(), and __reversed__() with the more general purposeRaymond Hettinger2004-03-011-9/+34
| | | | | | | __getitem__() and __setitem__(). Simplifies the API, reduces the code size, adds flexibility, and makes deques work with bisect.bisect(), random.shuffle(), and random.sample().
* Improvements to collections.deque():Raymond Hettinger2004-02-291-3/+89
| | | | | | | | * 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.
* Make deque.rotate() smarter. Beef-up related tests.Raymond Hettinger2004-02-081-9/+43
|
* * Incorporate Skip's suggestions for documentation (explain the word dequeRaymond Hettinger2004-02-071-0/+12
| | | | | comes from and show the differences from lists). * Add a rotate() method.
* * Fix ref counting in extend() and extendleft().Raymond Hettinger2004-02-071-0/+4
| | | | * Let deques support reversed().
* Have deques support high volume loads.Raymond Hettinger2004-02-061-0/+12
|
* * Move collections.deque() in from the sandboxRaymond Hettinger2004-01-291-0/+337
* Add unittests, newsitem, and whatsnew * Apply to Queue.py mutex.py threading.py pydoc.py and shlex.py * Docs are forthcoming