[Python-Dev] Exception Reorg PEP revised yet again

Brett Cannon bcannon at gmail.com
Thu Aug 11 02:06:22 CEST 2005

On 8/10/05, Raymond Hettinger <raymond.hettinger at verizon.net> wrote:
> > > Then I don't follow what you mean by "moved under os".
> >
> > In other words, to get the exception, do ``from os import
> > WindowsError``.  Unfortunately we don't have a generic win module to
> > put it under.  Maybe in the platform module instead?
> -1 on either.  The WindowsError exception needs to in the main exception
> tree.  It occurs in too many different modules and applications.  That
> is a good reason for being in the main tree.

Where is it used so much?  In the stdlib, grepping for WindowsError
recursively in Lib in 2.4 turns up only one module raising it
(subprocess) and only two modules with a total of three places of
catching it (ntpath once, urllib twice).  In Module, there are no

> If the name bugs you, I would support renaming it to PlatformError or
> somesuch.  That would make it free for use with Mac errors and Linux
> errors.  Also, it wouldn't tie a language feature to the name of an MS
> product.

I can compromise to this if others prefer this alternative.  Anybody
else have an opinion?


More information about the Python-Dev mailing list