Dynamically replacing an objects __class__; is it safe?

alister alister.ware at ntlworld.com
Thu Mar 16 05:17:20 EDT 2017


On Wed, 15 Mar 2017 19:10:17 -0700, Deborah Swanson wrote:

> 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...  ;)

no kites are a wing, although they are dependant on the string to hold 
them up.




-- 
Too many people are thinking of security instead of opportunity.  They 
seem
more afraid of life than death.
		-- James F. Byrnes


More information about the Python-list mailing list