Dynamically replacing an objects __class__; is it safe?

Chris Angelico rosuav at gmail.com
Wed Mar 15 18:28:48 EDT 2017


On Thu, Mar 16, 2017 at 9:19 AM, MRAB <python at mrabarnett.plus.com> wrote:
> 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, ... :-)

Certainly not. If they were, you'd move (or spin) them faster to go
up, and slower to go down. But you don't. So it's all about the
ugliness. You twist the blades up a bit to make the helicopter uglier.

ChrisA



More information about the Python-list mailing list