eryksun added the comment:

> Is there a way people can set errno to zero from Python code? 
> Or do we need to ship 3.5.1 already?

The only the thing that comes to mind is using ctypes based on the CRT's 
implementation of errno:

    import ctypes
    import errno
    import time

    ucrtbase = ctypes.CDLL('ucrtbase')
    ucrtbase._errno.restype = ctypes.POINTER(ctypes.c_int)
    c_errno = ucrtbase._errno().contents

    >>> time.strftime('')
    ''
    >>> c_errno.value = errno.EINVAL; time.strftime('')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ValueError: Invalid format string

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25092>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to