[Python-Dev] UserString

Barry Warsaw barry at python.org
Thu Feb 24 15:58:52 CET 2005


On Tue, 2005-02-22 at 11:16, Guido van Rossum wrote:
> > Really?  I do this kind of thing all the time:
> > 
> > import os
> > import errno
> > try:
> >     os.makedirs(dn)
> > except OSError, e:
> >     if e.errno <> errno.EEXIST:
> >         raise
> 
> You have a lot more faith in the errno module than I do. Are you sure
> the same error codes work on all platforms where Python works? 

No, but I'm pretty confident the symbolic names for the errors are
consistent for any platform I've cared about <wink>.

> It's
> also not exactly readable (except for old Unix hacks).

Guilty as charged. ;)

-Barry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/python-dev/attachments/20050224/3ad2c808/attachment.pgp


More information about the Python-Dev mailing list