A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-February/051747.html below:

[Python-Dev] UserString

[Python-Dev] UserString [Python-Dev] UserStringDavid Ascher david.ascher at gmail.com
Tue Feb 22 17:20:47 CET 2005
On Tue, 22 Feb 2005 08:16:52 -0800, Guido van Rossum
<gvanrossum at gmail.com> 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? It's
> also not exactly readable (except for old Unix hacks).

Agreed. In general, I often wish in production code (especially in
not-100% Python systems) that Python did a better job of at the very
least documenting what kinds of exceptions were raised by what
function calls.  Otherwise you end up with what are effectively
blanket try/except statements way too often for my taste.

--da
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4