Antti Haapala added the comment: Gnulib portability library has https://www.gnu.org/software/gnulib/manual/html_node/Integer-Range-Overflow.html and https://www.gnu.org/softwarhe/gnulib/manual/html_node/Integer-Type-Overflow.html and even macros for producing well-defined integer wraparound for signed integers: https://www.gnu.org/software/gnulib/manual/html_node/Wraparound-Arithmetic.html
That code is under GPL but I believe there is no problem if someone just looks into that for ideas on how to write similar macros. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue1621> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com