[Python-Dev] [Python-checkins] r45925 - in python/trunk: Lib/tempfile.py Lib/test/test_os.py Misc/NEWS Modules/posixmodule.c

M.-A. Lemburg mal at egenix.com
Thu May 11 13:26:11 CEST 2006


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 ! ::::


More information about the Python-Dev mailing list