[issue15710] logging module crashes in Python 2.7.3 for handler.setLevel(long)

Vinay Sajip report at bugs.python.org
Fri Aug 24 20:53:49 CEST 2012


Vinay Sajip added the comment:

type(-2**31) is long for 2.5 and 2.6 as well as 2.7. The check was added as a response to #6314, to catch incorrect values being passed as levels.

It could be argued that -2**31 is not a sensible log level. While int and long are supposed to be interchangeable for most purposes, isn't this a reasonable case where you shouldn't need to support long? If you feel not, what scenarios do you believe lie outside the "most purposes"?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15710>
_______________________________________


More information about the Python-bugs-list mailing list