[Python-Dev] PEP 246, redux (original) (raw)

Michael Hudson mwh at python.net
Mon Jan 10 19:53:33 CET 2005


Alex Martelli <aleax at aleax.it> writes:

I didn't know about the "let the object lie" quirk in isinstance. If that quirk is indeed an intended design feature, rather than an implementation 'oops', it might perhaps be worth documenting it more clearly; I do not find that clearly spelled out in the place I'd expect it to be, namely <http://docs.python.org/lib/built-in-funcs.html> under 'isinstance'.

Were you not at the PyPy sprint where bugs in some getattr method caused infinite recursions on the isinstance's code attempting to access class? The isinstance code then silently eats the error, so we had (a) a massive slowdown and (b) isinstance failing in an "impossible" way. A clue was that if you ran the code on OS X with its silly default stack limits the code dumped core instead of going slowly insane.

This is on quirk I'm not likely to forget in a hurry...

Cheers, mwh

-- If trees could scream, would we be so cavalier about cutting them down? We might, if they screamed all the time, for no good reason. -- Jack Handey



More information about the Python-Dev mailing list