summaryrefslogtreecommitdiffstats
path: root/Lib/collections.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue 6370: Performance issue with collections.Counter().Raymond Hettinger2009-06-291-2/+4
|
* Revert r73401 per Raymond Hettinger's request.Alexandre Vassalotti2009-06-121-6/+4
| | | | | | The rational is the change might cause imcompatiblity problems with PyYAML. In addition, Raymond wants to kept the different versions of collections synchronized across Python versions.
* Make pickling of OrderedDict instances more efficient.Alexandre Vassalotti2009-06-121-4/+6
|
* Fix field name conflicts for named tuples.Raymond Hettinger2009-05-271-7/+7
|
* using sys._getframe(x), where x > 0 doesnt' work on IronPythonBenjamin Peterson2009-05-051-2/+5
|
* Minor factoring.Raymond Hettinger2009-04-081-1/+1
|
* Add docstrings.Raymond Hettinger2009-04-081-0/+25
|
* Replace the localized min/max calls with normal if/elseRaymond Hettinger2009-04-041-4/+4
|
* Have namedtuple's field renamer assign names thatRaymond Hettinger2009-04-021-1/+1
| | | | are consistent with the corresponding tuple index.
* Separate initialization from clearing.Raymond Hettinger2009-03-251-3/+4
|
* Make imported name private and wrap long-line.Raymond Hettinger2009-03-231-3/+4
|
* Move initialization of root link to __init__.Raymond Hettinger2009-03-231-1/+2
|
* Add more comments. Improve variable names.Raymond Hettinger2009-03-231-32/+44
| | | | | | Make links clearer by using a Link object instead of a list. Use proxy links to avoid circular references.
* Fix typoRaymond Hettinger2009-03-191-2/+2
|
* * Add implementation notes.Raymond Hettinger2009-03-191-13/+25
| | | | | * Re-order methods so that those touching the underlying data structure come first and the derived methods come last.
* * Add clearer comment to initialization code.Raymond Hettinger2009-03-191-3/+3
| | | | | | * Add optional argument to popitem() -- modeled after Anthon van der Neut's C version. * Fix method markup in docs.
* Improve implementation with better underlying data structureRaymond Hettinger2009-03-191-14/+26
| | | | | | for O(1) deletions. Big-Oh performance now the same as regular dictionaries. Uses a doubly-linked list instead of a list/seq to track insertion order.
* Use mixin methods where possible. (2.7 only -- these don't all exist in 3.0)Raymond Hettinger2009-03-181-18/+7
|
* Backport 70140, 70141, 70143, and 70144.Raymond Hettinger2009-03-031-5/+9
| | | | | Adds tests, switches from list to deque, fixes __reduce__ which was unnecessarily copying __keys.
* Minor simplification.Raymond Hettinger2009-03-031-1/+1
|
* Make the underlying data structure more private.Raymond Hettinger2009-03-031-15/+19
|
* Backport 70106: Add OrderedDict support to collections.namedtuple().Raymond Hettinger2009-03-031-5/+5
|
* Backport PEP 372: OrderedDict()Raymond Hettinger2009-03-031-3/+93
|
* Issue 1818: collections.namedtuple() to support automatic renaming of ↵Raymond Hettinger2009-02-101-2/+12
| | | | invalid fieldnames.
* Issue 5021: doctest.testfile should set __name__Raymond Hettinger2009-01-271-1/+1
|
* Update comments and add an optimized path for Counter.update().Raymond Hettinger2009-01-221-3/+5
|
* Simplify explanation of multiset operations by removing restrictions on ↵Raymond Hettinger2009-01-211-2/+2
| | | | negative inputs.
* Make merging easier by formattng comment blocks the same in Py3.1Raymond Hettinger2009-01-201-3/+5
|
* Add Counter() to __all__.Raymond Hettinger2009-01-201-1/+1
|
* Build-outs for Counter() class:Raymond Hettinger2009-01-201-8/+91
| | | | | | * Constructor and update() support keyword args (like their dict counterparts). * The 'del' statement no longer raises KeyError for missing values. * Add multiset operations: __add__, __sub__, __and__, __or__.
* Speed-up __repr__. Eliminate duplicate tests. Use a from-irmport.Raymond Hettinger2009-01-131-48/+3
|
* Fixup and simplify docstrings and doctests.Raymond Hettinger2009-01-131-16/+14
|
* Simplify Counter() API. Replace items keyword argumentRaymond Hettinger2009-01-131-22/+26
| | | | | | | with a mapping. Makes Counter() idempotent, makes update() API the same as Counter.__init__(), makes a more readable repr, makes the API more dict-like, and allows Steven Bethard's update() example to work.
* Issue 1696199: Add collections.Counter().Raymond Hettinger2009-01-121-0/+201
|
* Fix namedtuple bug reported by Glenn Linderman. Template did not form ↵Raymond Hettinger2008-09-251-1/+1
| | | | correctly if the field names were input in Unicode.
* Issue3065: Fixed pickling of named tuples. Added tests.Raymond Hettinger2008-06-091-1/+3
|
* Issue 2903: Add __name__ in globals for namedtuple namespace.Raymond Hettinger2008-05-301-2/+3
|
* Neaten-up the named tuple docsRaymond Hettinger2008-01-101-1/+1
|
* Clarify how to add a field to a named tuple.Raymond Hettinger2008-01-101-0/+3
|
* Examples for named tuple subclassing should include __slots__Raymond Hettinger2008-01-101-1/+3
|
* Expand comment.Raymond Hettinger2008-01-081-1/+2
|
* Use get() instead of pop() for the optimized version of _replace().Raymond Hettinger2008-01-071-1/+1
|
* Cleanup named tuple subclassing example.Raymond Hettinger2008-01-071-3/+4
|
* Add another named tuple subclassing example.Raymond Hettinger2008-01-071-0/+8
|
* Cleanup subclassing example to more clearly show fixed-width print format.Raymond Hettinger2008-01-071-2/+1
|
* Add subclassing example to docs for named tuples.Raymond Hettinger2008-01-071-2/+9
|
* Speed-up named tuple's _make() constructor.Raymond Hettinger2008-01-061-2/+2
|
* Small code simplification. Forgot that classmethods can be called from ↵Raymond Hettinger2008-01-061-1/+1
| | | | intances.
* Add error-checking to namedtuple's _replace() method.Raymond Hettinger2008-01-051-1/+4
|
* Improve namedtuple's _cast() method with a docstring, new name, and ↵Raymond Hettinger2008-01-051-2/+9
| | | | error-checking.