Super Tuples
Aahz Maruch
aahz at netcom.com
Mon Dec 27 11:18:06 EST 1999
In article <386745A6.9B671DBF at prescod.net>,
Paul Prescod <paul at prescod.net> wrote:
>
>I propose that in Python 1.6 tuples be given the demonstrated features:
>
>>>> time = (hour=24, minute=00, second=00 )
I think you're more likely to get somewhere with the "locking dict" idea
that others have mentioned, essentially the immutable equivalent of a
dict. Thus the syntax would be
time = ( 'hour':24, 'minute':0, 'second':0 )
print time['minute']
time['foo'] = 'bar'
...and you get an exception
--
--- Aahz (@netcom.com)
Androgynous poly kinky vanilla queer het <*> http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6
Eighth Virtual Anniversary -- 4 days and counting!
More information about the Python-list
mailing list