This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients JohnLeitch, belopolsky, brycedarling, eryksun, r.david.murray, skrah, steve.dower, terry.reedy, vstinner, zach.ware
Date 2015-09-14.16:42:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1442248963.63.0.227510213004.issue25092@psf.upfronthosting.co.za>
In-reply-to
Content
> 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
History
Date User Action Args
2015-09-14 16:42:43eryksunsetrecipients: + eryksun, terry.reedy, belopolsky, vstinner, r.david.murray, skrah, zach.ware, steve.dower, JohnLeitch, brycedarling
2015-09-14 16:42:43eryksunsetmessageid: <1442248963.63.0.227510213004.issue25092@psf.upfronthosting.co.za>
2015-09-14 16:42:43eryksunlinkissue25092 messages
2015-09-14 16:42:43eryksuncreate