[issue22961] ctypes.WinError & OSError

2021-02-23 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-

[issue22961] ctypes.WinError & OSError

2014-11-28 Thread eryksun
eryksun added the comment: > the default value is EINVAL. Should that be specified in the docs? Currently it states that "[t]he errno attribute is then an approximate translation, in POSIX terms, of that native error code". https://docs.python.org/3/library/exceptions.html#OSError --

[issue22961] ctypes.WinError & OSError

2014-11-28 Thread Simon Zack
Simon Zack added the comment: Ok, my bad, I was creating my own OSErrors so I was just testing it out. I just found the default to be rather confusing as I thought None would not be mapped to anything. -- ___ Python tracker

[issue22961] ctypes.WinError & OSError

2014-11-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: No, OSError.errno is converted from the Windows error code. There is a translation map (see PC/errmap.h, built with the _dosmaperr() function) and the default value is EINVAL. It's working as intended. What was the winerror code? do you think it should b

[issue22961] ctypes.WinError & OSError

2014-11-28 Thread Ned Deily
Changes by Ned Deily : -- nosy: +amaury.forgeotdarc, belopolsky, meador.inge ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue22961] ctypes.WinError & OSError

2014-11-27 Thread Simon Zack
New submission from Simon Zack: The ctypes.WinError function returns: OSError(None, descr, None, code) However OSError does not appear to allow None as a first argument, and converts it to 22 which is the EINVAL "Invalid Argument" error. This is rather confusing as there was no invalid ar

[issue22961] ctypes.WinError & OSError

2014-11-27 Thread Simon Zack
Changes by Simon Zack : -- components: +ctypes versions: +Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr