Sat, 29 Mar 2003 18:27:50 -0600 (CST)
On Tue, 11 Mar 2003, Greg Ewing wrote:
> Perhaps it would be useful to distinguish between what
> might be called "read-only" introspection, and more
> powerful forms of introspection.
> Usually it doesn't do any harm to be able to find out
> things like what class an object belongs to and what
> methods it supports, so perhaps these kinds of
> introspections don't need to be restricted by default.
A serious flaw with this particular point is that Python
does not separate the identity of a class from the power
to create instances of that class. Having access to a
particular instance should certainly not allow one to
ask it for its class, and then instantiate the class with
arbitrary constructor arguments.