Would this be called a bug in inspect ?

Terry Reedy tjreedy at udel.edu
Wed Oct 1 00:47:10 EDT 2008


Stef Mientki wrote:

> But the real point is, should a module like inspect not be insensitive 
> to these kind of errors ?

In my opinion, no.  In any case, the doc says

"inspect.getmembers(object[, predicate])
Return all the members of an object in a list of (name, value) pairs 
sorted by name. "

so it is behaving according to spec.  Getting the name,value pairs 
should not raise exceptions.  If it does, *something* is wrong, as it 
was in this case.  Stopping is as sensible as anything, and in line with 
the general behavior of Python.




More information about the Python-list mailing list