errno 22 instead of errno 2
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Wed Jan 28 18:55:51 EST 2009
En Wed, 28 Jan 2009 07:04:30 -0200, Tim Golden <mail at timgolden.me.uk>
escribió:
> Glenn Linderman wrote:
>> open("c:\abc","rb")
>> This simple one-line script, produces errno 22 on Python 2.6, but
>> errno 2 on Python 2.5.2
>
> Just glancing quickly at the svn logs, there certainly were some
> changes around that area in 2008:
>
> I'd question whether it's strictly a "regression", unintentional or
> otherwise, since I doubt the code makes any particular commitment as
> to which error code is raised, but I'd certainly be looking askance
> if I had code which relied on a particular error number which then
> changed! Still, that's what unit tests are for, I suppose.
Even if nothing had changed on Python, one should note that the Windows
API doesn't promise anything about the specific set of error codes a
function might set (not that it happens every day, but MS has reserved the
right to alter them).
PS: and thanks for my new word of the day: "askance"
--
Gabriel Genellina
More information about the Python-list
mailing list