STINNER Victor added the comment: re_octal_escape_overflow_raise.patch: you should write a subfunction to not repeat the error message 3 times.
+ if c > 0o377: Hum, I never use octal. 255 instead of 0o377 would be less surprising :-p By the way, you should also check for negative numbers. >>> -3 & 0xff 253 Before, "& 0xff" also converted negative numbers to positive in range 0..255. ---------- nosy: +haypo _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22362> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com