giant stdlib tuples

Carel Fellinger cfelling at iae.nl
Thu Feb 21 21:03:44 EST 2002


Quinn Dunkan <quinn at regurgitate.ugcs.caltech.edu> wrote:
...
> The days of 'os.stat(fn)[stat.ST_BLAH]' are over.

> I still wonder about those wacky C structure names, though.  Did they think
> people would forget what kind of structure they were asking about after they
> typed the '.'?

In the old days when this habbit formed, (some?) C compilers used to
simple replace a field name with an offset and for simplicity reasons
used the same offset for all fields with the same field name
regardless of in what struct it was used.  So you had to name those
fields differently or be sure that they all *really* had the same
offset.  It took me days to find the bug this caused, and then I
decided to never ever use C again, boy was I glad:)
-- 
groetjes, carel



More information about the Python-list mailing list