[Python-Dev] Symbolic errno values in error messages

Yannick Gingras ygingras at ygingras.net
Mon May 19 21:48:26 CEST 2008


"Guido van Rossum" <guido at python.org> writes:
> Have you considered whether this works on all platforms? (E.g.
> Windows, or embedded non-Unix-based.)

Yes but I guess I didn't comment it properly.  The line

   printed_errno = errno_str ? errno_str : self->myerrno;

ensures that we gracefully fallback to numeric errno when here is no
symbolic value available.  The code is only invoked if there is an
errno value, which takes care of most non-Unix platforms.

-- 
Yannick Gingras


More information about the Python-Dev mailing list