[Python-checkins] r58971 - python/trunk/Lib/collections.py
raymond.hettinger
python-checkins at python.org
Wed Nov 14 23:56:17 CET 2007
Author: raymond.hettinger
Date: Wed Nov 14 23:56:16 2007
New Revision: 58971
Modified:
python/trunk/Lib/collections.py
Log:
Make __fields__ read-only. Suggested by Issac Morland
Modified: python/trunk/Lib/collections.py
==============================================================================
--- python/trunk/Lib/collections.py (original)
+++ python/trunk/Lib/collections.py Wed Nov 14 23:56:16 2007
@@ -54,7 +54,7 @@
template = '''class %(typename)s(tuple):
'%(typename)s(%(argtxt)s)'
__slots__ = ()
- __fields__ = %(field_names)r
+ __fields__ = property(lambda self: %(field_names)r)
def __new__(cls, %(argtxt)s):
return tuple.__new__(cls, (%(argtxt)s))
def __repr__(self):
More information about the Python-checkins
mailing list