Downcast (I know it sounds silly, but ...)

Rocco Rossi rockrossi69 at libero.it
Thu Jan 2 15:04:24 EST 2003


I was wondering if it is possible in Python to do something analogous to
downcasting in a statically typed language like C++. I mean is it possible
to take an instance of a base class and magically transform it into an
instance of some derived class eventually fixing things (like the missing
attribute data)?

Thanx.







More information about the Python-list mailing list