[issue27650] Implement `__repr__` methods for logging.Logger and others

Ram Rachum report at bugs.python.org
Sat Aug 6 12:30:25 EDT 2016


Ram Rachum added the comment:

Okay, but consider that if there are no tests, this code will never be run during testing. Consider that if there's a bug in that code that causes an exception to be raised (unlikely, I know, but maybe from the call to getLevelName) it won't be discovered until a release of Python is made and some user runs it and sees an exception. Maybe someone in the future will want to add more code into the __repr__ and that code will raise an exception. Having tests that run these methods ensures this will be caught before release.

----------

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


More information about the Python-bugs-list mailing list