]> granicus.if.org Git - python/commit
Minor fix-ups to named tuples:
authorRaymond Hettinger <python@rcn.com>
Fri, 4 Jan 2008 03:22:53 +0000 (03:22 +0000)
committerRaymond Hettinger <python@rcn.com>
Fri, 4 Jan 2008 03:22:53 +0000 (03:22 +0000)
commite0734e7dc0dcccc91ed657191b804b3a846ad3f6
tree70cb770b9fb3fbca03fcbb1a53df10f69612a78b
parent123d5c9396a6c12d418bbdf6d7ec861537f4c199
Minor fix-ups to named tuples:

* 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.
Doc/library/collections.rst
Lib/collections.py
Lib/test/test_collections.py