Named tuples
Bengt Richter
bokr at oz.net
Wed Nov 17 23:54:21 EST 2004
On Thu, 18 Nov 2004 02:57:23 GMT, Bryan <belred1 at yahoo.com> wrote:
[...]
>it should be possible to avoid a recusive problem:
>
> >>> a = ('1', '2')
> >>> a.__names__ = ('ONE', 'TWO')
I guess you are working with a patched version of python?
>>> a = ('1', '2')
>>> a.__names__ = ('ONE', 'TWO')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: 'tuple' object has only read-only attributes (assign to .__names__)
Regards,
Bengt Richter
More information about the Python-list
mailing list