Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Issue 5021: doctest.testfile should set __name__ | Raymond Hettinger | 2009-01-27 | 1 | -1/+1 |
| | |||||
* | Update comments and add an optimized path for Counter.update(). | Raymond Hettinger | 2009-01-22 | 1 | -3/+5 |
| | |||||
* | Simplify explanation of multiset operations by removing restrictions on ↵ | Raymond Hettinger | 2009-01-21 | 1 | -2/+2 |
| | | | | negative inputs. | ||||
* | Make merging easier by formattng comment blocks the same in Py3.1 | Raymond Hettinger | 2009-01-20 | 1 | -3/+5 |
| | |||||
* | Add Counter() to __all__. | Raymond Hettinger | 2009-01-20 | 1 | -1/+1 |
| | |||||
* | Build-outs for Counter() class: | Raymond Hettinger | 2009-01-20 | 1 | -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 Hettinger | 2009-01-13 | 1 | -48/+3 |
| | |||||
* | Fixup and simplify docstrings and doctests. | Raymond Hettinger | 2009-01-13 | 1 | -16/+14 |
| | |||||
* | Simplify Counter() API. Replace items keyword argument | Raymond Hettinger | 2009-01-13 | 1 | -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 Hettinger | 2009-01-12 | 1 | -0/+201 |
| | |||||
* | Fix namedtuple bug reported by Glenn Linderman. Template did not form ↵ | Raymond Hettinger | 2008-09-25 | 1 | -1/+1 |
| | | | | correctly if the field names were input in Unicode. | ||||
* | Issue3065: Fixed pickling of named tuples. Added tests. | Raymond Hettinger | 2008-06-09 | 1 | -1/+3 |
| | |||||
* | Issue 2903: Add __name__ in globals for namedtuple namespace. | Raymond Hettinger | 2008-05-30 | 1 | -2/+3 |
| | |||||
* | Neaten-up the named tuple docs | Raymond Hettinger | 2008-01-10 | 1 | -1/+1 |
| | |||||
* | Clarify how to add a field to a named tuple. | Raymond Hettinger | 2008-01-10 | 1 | -0/+3 |
| | |||||
* | Examples for named tuple subclassing should include __slots__ | Raymond Hettinger | 2008-01-10 | 1 | -1/+3 |
| | |||||
* | Expand comment. | Raymond Hettinger | 2008-01-08 | 1 | -1/+2 |
| | |||||
* | Use get() instead of pop() for the optimized version of _replace(). | Raymond Hettinger | 2008-01-07 | 1 | -1/+1 |
| | |||||
* | Cleanup named tuple subclassing example. | Raymond Hettinger | 2008-01-07 | 1 | -3/+4 |
| | |||||
* | Add another named tuple subclassing example. | Raymond Hettinger | 2008-01-07 | 1 | -0/+8 |
| | |||||
* | Cleanup subclassing example to more clearly show fixed-width print format. | Raymond Hettinger | 2008-01-07 | 1 | -2/+1 |
| | |||||
* | Add subclassing example to docs for named tuples. | Raymond Hettinger | 2008-01-07 | 1 | -2/+9 |
| | |||||
* | Speed-up named tuple's _make() constructor. | Raymond Hettinger | 2008-01-06 | 1 | -2/+2 |
| | |||||
* | Small code simplification. Forgot that classmethods can be called from ↵ | Raymond Hettinger | 2008-01-06 | 1 | -1/+1 |
| | | | | intances. | ||||
* | Add error-checking to namedtuple's _replace() method. | Raymond Hettinger | 2008-01-05 | 1 | -1/+4 |
| | |||||
* | Improve namedtuple's _cast() method with a docstring, new name, and ↵ | Raymond Hettinger | 2008-01-05 | 1 | -2/+9 |
| | | | | error-checking. | ||||
* | Minor fix-ups to named tuples: | Raymond Hettinger | 2008-01-04 | 1 | -4/+2 |
| | | | | | | | | | * Make the _replace() method respect subclassing. * Using property() to make _fields read-only wasn't a good idea. It caused len(Point._fields) to fail. * Add note to _cast() about length checking and alternative with the star-operator. | ||||
* | Users demand iterable input for named tuples. The author capitulates. | Raymond Hettinger | 2007-12-18 | 1 | -1/+2 |
| | |||||
* | Simplify and speedup _asdict() for named tuples. | Raymond Hettinger | 2007-12-18 | 1 | -5/+5 |
| | |||||
* | Add more namedtuple() test cases. Neaten the code and comments. | Raymond Hettinger | 2007-12-18 | 1 | -10/+11 |
| | |||||
* | Faster and simpler _replace() method | Raymond Hettinger | 2007-12-14 | 1 | -1/+1 |
| | |||||
* | Add line spacing for readability | Raymond Hettinger | 2007-12-14 | 1 | -8/+8 |
| | |||||
* | Cleaner method naming convention | Raymond Hettinger | 2007-12-14 | 1 | -7/+7 |
| | |||||
* | Small speedup | Raymond Hettinger | 2007-12-13 | 1 | -1/+2 |
| | |||||
* | Simplify implementation of __replace__() | Raymond Hettinger | 2007-12-13 | 1 | -1/+1 |
| | |||||
* | Error checking was too aggressive (reported by Chris Tismer) | Raymond Hettinger | 2007-12-05 | 1 | -2/+2 |
| | |||||
* | Backport of _abccoll.py by Benjamin Arangueren, issue 1383. | Guido van Rossum | 2007-11-22 | 1 | -0/+6 |
| | | | | With some changes of my own thrown in (e.g. backport of r58107). | ||||
* | Small improvement to the implementation of __replace__(). | Raymond Hettinger | 2007-11-15 | 1 | -1/+1 |
| | |||||
* | Accept Issac Morland's suggestion for __replace__ to allow multiple replacements | Raymond Hettinger | 2007-11-15 | 1 | -4/+8 |
| | | | | | | (suprisingly, this simplifies the signature, improves clarity, and is comparably fast). Update the docs to reflect a previous change to the function name. Add an example to the docs showing how to override the default __repr__ method. | ||||
* | Make __fields__ read-only. Suggested by Issac Morland | Raymond Hettinger | 2007-11-14 | 1 | -1/+1 |
| | |||||
* | Shorter name for namedtuple() | Raymond Hettinger | 2007-10-23 | 1 | -5/+5 |
| | |||||
* | More docs, error messages, and tests | Raymond Hettinger | 2007-10-16 | 1 | -0/+3 |
| | |||||
* | Improve error messages | Raymond Hettinger | 2007-10-16 | 1 | -6/+7 |
| | |||||
* | Make the error messages more specific | Raymond Hettinger | 2007-10-09 | 1 | -6/+9 |
| | |||||
* | Eliminate camelcase function name | Raymond Hettinger | 2007-10-08 | 1 | -5/+9 |
| | |||||
* | Better variable names | Raymond Hettinger | 2007-10-08 | 1 | -4/+4 |
| | |||||
* | Add comments to NamedTuple code. | Raymond Hettinger | 2007-10-08 | 1 | -3/+18 |
| | | | | | Let the field spec be either a string or a non-string sequence (suggested by Martin Blais with use cases). Improve the error message in the case of a SyntaxError (caused by a duplicate field name). | ||||
* | Add __asdict__() to NamedTuple and refine the docs. | Raymond Hettinger | 2007-10-05 | 1 | -5/+10 |
| | | | | | | Add maxlen support to deque() and fixup docs. Partially fix __reduce__(). The None as a third arg was no longer supported. Still needs work on __reduce__() to handle recursive inputs. | ||||
* | Handle corner cased on 0-tuples and 1-tuples. Add verbose option so people ↵ | Raymond Hettinger | 2007-09-18 | 1 | -8/+9 |
| | | | | can see how it works. | ||||
* | Sync-up named tuples with the latest version of the ASPN recipe. | Raymond Hettinger | 2007-09-17 | 1 | -10/+19 |
| | | | | | | | Allows optional commas in the field-name spec (help when named tuples are used in conjuction with sql queries). Adds the __fields__ attribute for introspection and to support conversion to dictionary form. Adds a __replace__() method similar to str.replace() but using a named field as a target. Clean-up spelling and presentation in doc-strings. |