Dynamically replacing an objects __class__; is it safe?

alister alister.ware at ntlworld.com
Thu Mar 16 11:51:25 EDT 2017


On Thu, 16 Mar 2017 14:04:19 +0000, Jon Ribbens wrote:

> On 2017-03-16, Robin Becker <robin at reportlab.com> wrote:
>> On 15/03/2017 13:53, 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.
>>
>> the whale in the Hitchhiker's Guide found itself flying without
>> feathers or wings
> 
> Well, only if you redefine "flying" to include "accelerating to terminal
> velocity straight downwards under the force of gravity"...

Arthur himself was a regular flyer.




-- 
genius, n.:
	Person clever enough to be born in the right place at the right
	time of the right sex and to follow up this advantage by saying
	all the right things to all the right people.



More information about the Python-list mailing list