Super Tuples
Paul Prescod
paul at prescod.net
Thu Dec 30 04:44:23 EST 1999
Eugene Goodrich wrote:
>
> ....
>
> Begging your pardon, but is it possible to make a class that looks
> tuplish to users trying to access it by index but also exposes its
> values via .properties? What incompatibilities with functions
> expecting tuples would this code provide: (sorry for any bad wrapping)
It is very close to possible to implement a Tuple type that allows both
indexed and name based access. The only problem is that Python does not
return keyword arguments to you in the order that they were specified.
Paul Prescod
More information about the Python-list
mailing list