On Wed, Feb 15, 2017 at 10:47 PM, Barry Scott <ba...@barrys-emacs.org> wrote: > __repr__ is interesting however. > > Typically I describe in a string why the value is being logged. That means > that the object is always a string. I cannot recall using debugLog( obj ) > in production. > > dlog('This is the state of obj at the start of event processing: %r' % (obj,))
Right. I would have no hesitation whatsoever in dumping out a crucial state object, even if it means writing a custom (and expensive) repr function for it. It's clean, simple, and immensely helpful in debugging. ChrisA _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/