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

Michael Hudson mwh at python.net
Thu Feb 21 12:35:37 CET 2002


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

> On Wed, 20 Feb 2002 08:41:31 -0500, Steve Holden <sholden at holdenweb.com> wrote:
> >Besides the underscores another poster mentioned, note also that you have
> >replaced a period with a comma. Your line which reads
> >
> >            self,dst=time.localtime(self.t)
> >
> >should read
> >
> >            self.dst=time.localtime(self.t)
> 
> Speaking of time.localtime() and giant tuple matches, I always wind
> up writing my own wrappers for times and pwents so access them as
> proper objects.
> 
> 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?

Cheers,
M.

-- 
  Every now and then, Google doesn't throw up what I need so I start
  checking Altavista, Yahoo, etc.  In almost every single case, I am
  brutally reminded why I use Google in the first place.
                                                  -- John Riddoch, asr



More information about the Python-list mailing list