Reasoning of calling a method on class object instead of class instance object

Michael Torrie torriem at gmail.com
Mon Mar 18 21:21:44 EDT 2019


On 03/18/2019 07:09 PM, Ben Finney wrote:
> Arup Rakshit <ar at zeit.io> writes:
> 
> Michael Torrie <torriem at gmail.com> writes:
> 
>> On 03/18/2019 05:55 PM, Ben Finney wrote:
>>>> If I call `_c_to_f`, `_f_to_c` methods on `self` instead of
>>>> `RefrigeratedShippingContainer` class object, still it works.
>>>
>>> That's right, and is indeed the point of making a static method on a
>>> class. 
>>
>> I'm confused. […] he never said anything about static methods unless
>> I'm really missing something.
> 
> You included it, quoted above (but stripped out the attribution; please
> don't do that). The only methods discussed in Arup Rakshit's message are
> ‘_c_to_f’ and ‘_f_to_c’, both static methods on the class.

Gotcha. Thanks.




More information about the Python-list mailing list