Hi, Le 06/05/2011 22:07, R. David Murray a écrit : > 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', >> copy(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. Drat. Nick, if it was indeed you, can you enlighten me? /off to replace all those addCleanup/setattr combos :( Regards
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4