Martin v. Löwis wrote:
> M.-A. Lemburg wrote:
>> BTW, and intended as offer for compromise, should we instead
>> add the Win32 codes to the errno module (or a new winerrno
>> module) ?! I can write a parser that takes winerror.h and
>> generates the module code.
> 
> Instead won't help: the breakage will still occur. It would
> be possible to put symbolic constants into the except clauses,
> instead of using the numeric values, but you still have to
> add all these "except WindowsError,e" clauses, even if
> the constants were available.

Right, I meant "instead of using ErrorCode approach".

> However, in addition would be useful: people will want to
> check for specific Win32 error codes, just because they are
> more descriptive. I propose to call the module "winerror"
> (in parallel to winerror.h, just as the errno module
> parallels errno.h)

Ok.

> Adding them all to the errno would work for most cases,
> except that you get conflicts for errno.errcode.

I think it's better to separate the two - you wouldn't
want to load all the winerror codes on Unix.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, May 11 2006)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to