Dynamically replacing an objects __class__; is it safe?

Deborah Swanson python at deborahswanson.net
Wed Mar 15 22:10:17 EDT 2017


MRAB wrote, on Wednesday, March 15, 2017 3:19 PM
> 
> On 2017-03-15 22:03, Gregory Ewing wrote:
> > Steve D'Aprano wrote:
> >> You probably can't make a whale fly just by changing the class to 
> >> bird. It will need wings, and feathers, at the very least.
> >
> > Some things succeed in flying with neither wings nor feathers. 
> > Helicopters, for example.
> >
> Could you argue that the blades were a kind of wing? After all, they 
> rely on the same principle of moving through the air to produce lift.
> 
> Balloons, on the other hand, ... :-)

or kites...  ;)



More information about the Python-list mailing list