Eryk Sun <eryk...@gmail.com> added the comment:

format_error() can use format "L" (long long) and then check for a value in the 
accepted range `value >= LONG_MIN && value <= ULONG_MAX`. If the value is out 
of range, raise OverflowError. Otherwise assign the value to DWORD `code`.

----------
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.5, Python 
3.6, Python 3.7

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

Reply via email to