f---ing typechecking
Sergey Dorofeev
sergey at fidoman.ru
Thu Feb 15 02:37:33 EST 2007
<skip at pobox.com> wrote in message
news:mailman.4019.1171498160.32031.python-list at python.org...
> It's effectively a tuple with field names. I don't know when the switch
> occurred (it's in 2.2, as far back as my built interpreter versions
> currently go), but back in the day os.stat used to return a plain old
> tuple.
posix.stat_result is CLASS, not regular tuple.
classes is the only way in python to approximate records/structs (may be
dict can be considered as record too, if we agree with strange syntaxis).
To consider tuples as struct, one must have a GREAT imagination, as tuples
functionally are _arrays_, with only difference from lists as freezeness -
the have NO filed names.
> I have no idea if the schizophrenic personality of tuples will improve
> with
> drugs^H^H^H^H^H Python 3, but I wouldn't be at all surprised if it did.
I think the best thing is to be more democratic when asked to add two arrays
:)
More information about the Python-list
mailing list