[Python-Dev] Null checking

Tim Peters tim.one@comcast.net
Mon, 10 Jun 2002 09:28:57 -0400

[Michael Hudson]
> ...
> I'd also like to know why all the (for instance) methods in
> tupleobject.c start with "if (!PyTuple_Check(self)".  You'd have to
> try REALLY hard to get those tests to fail...

Not at all:  extension modules can pass any sort of nonsense to public API
functions.  Python shouldn't crash as a result.  The checking is expensive,