STINNER Victor added the comment: > Both ways, with OverflowError and Py3k DeprecationWarning, are good to me. > What would you say about this Benjamin?
I prefer an OverflowError. I don't like having to enable a flag to fix a bug :-( According to the issue title, it's really a bug: "format method: c presentation type *broken* in 2.7". Note: The unit test may check the error message, currently the error message is irrevelant (it mentions unicode whereas bytes (str type) are used). >>> format(-1, "c") OverflowError: %c arg not in range(0x110000) (wide Python build) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7267> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com