Commit Graph

109 Commits

Author SHA1 Message Date
Raymond Hettinger a7fc4b13e0 Add __asdict__() to NamedTuple and refine the docs.
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.
2007-10-05 02:47:07 +00:00
Raymond Hettinger 2b03d45bb9 Handle corner cased on 0-tuples and 1-tuples. Add verbose option so people can see how it works. 2007-09-18 03:33:19 +00:00
Raymond Hettinger d36a60e1e3 Sync-up named tuples with the latest version of the ASPN recipe.
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.
2007-09-17 00:55:00 +00:00
Raymond Hettinger 767debb6aa Allow all alphanumeric and underscores in type and field names. 2007-05-21 16:40:10 +00:00
Raymond Hettinger 0d6a8ccfb7 Replace assertion with straight error-checking. 2007-05-21 08:13:35 +00:00
Raymond Hettinger f3241a3727 Fix beginner mistake -- don't mix spaces and tabs. 2007-05-19 01:50:11 +00:00
Raymond Hettinger 5a41daf096 Improvements to NamedTuple's implementation, tests, and documentation 2007-05-19 01:11:16 +00:00
Raymond Hettinger c37e5e04eb Add collections.NamedTuple 2007-03-01 06:16:43 +00:00
Raymond Hettinger eb9798892d Prepare collections module for pure python code entries. 2007-02-28 18:37:52 +00:00