giant stdlib tuples (was: Re: Help with code)

Michael Hudson mwh at python.net
Fri Feb 22 05:40:21 EST 2002


quinn at regurgitate.ugcs.caltech.edu (Quinn Dunkan) writes:

> On Thu, 21 Feb 2002 11:35:37 GMT, Michael Hudson <mwh at python.net> wrote:
> >quinn at schilling.ugcs.caltech.edu (Quinn Dunkan) writes:
> >> It's always seemed to me that things like time, pwd, grp, and stat
> >> are pretty non-pythonic.  You can't even really say it's because of
> >> the thin wrapper thing because writing and using a StructType or
> >> something wouldn't be much harder than using tuples.
> >> 
> >> Of course, I've learned to carry around my own little wrappers, but
> >> I've always wondered why they were that way in the first place.
> >
> >Used Python 2.2 yet?
> 
> Aha!  I hadn't seen this one advertised anywhere, and they disguise
> themselves as tuples.

Well, they have to, or lots of code would break...

> pwd and grp still don't return structs, but it's a good start.
> 
> Deserves more advertisement, I think:

Perhaps.  Don't try and pickle the results until 2.2.1 gets released...

Anyone feel like contributing code to similarly enhance pwd and grp?

Cheers,
M.

-- 
  "The future" has arrived but they forgot to update the docs.
                                        -- R. David Murray, 9 May 2000



More information about the Python-list mailing list