Xavier Morel <xavier.mo...@masklinn.net> added the comment:
> I think that patching logging.disable to raise a type error immediately would > be welcome FWIW `logging` has a built-in checker / converter[0] which is already used in a bunch of places (e.g. the aforementioned setLevel), it could just be added inside `disable` in the same way it's used in setLevel[1] and would uniformly convert "level names" to proper levels or raise an error. That seems like a really easy patch / contribution. [0] https://github.com/python/cpython/blob/3.9/Lib/logging/__init__.py#L189 [1] https://github.com/python/cpython/blob/3.9/Lib/logging/__init__.py#L906 ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42644> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com