[Python-Dev] Problems with regrtest and with logging
R. David Murray
rdmurray at bitdance.com
Fri May 6 22:07:30 CEST 2011
On Fri, 06 May 2011 19:51:31 +0200, =?UTF-8?Q?=C3=89ric_Araujo?= <merwok at netwok.org> wrote:
> regrtest helpfully reports when a test leaves the environment unclean
> (sys.path, os.environ, logging._handlerList), but I think the
> implementation is buggy: it compares object identity and then value.
> Why is comparing identity useful? Iâd just use ==. It makes writing
> cleanup code easier (just use addCleanup(setattr, obj, 'attr',
Well, the implementation is intentional. Nick (I think) added the
identity check, and he had a reason at the time. I don't remember what
it was, though.
R. David Murray http://www.bitdance.com
More information about the Python-Dev