Arup Rakshit wrote:

> In this piece of code:
> 
> class RefrigeratedShippingContainer(ShippingContainer):

>     @staticmethod
>     def _c_to_f(celsius):
>         return celsius * 9/5 + 32

>     @property
>     def fahrenheit(self):
>         return RefrigeratedShippingContainer._c_to_f(self.celsius)

> If I call `_c_to_f`, `_f_to_c` methods on `self` instead of
> `RefrigeratedShippingContainer` class object, still it works. So what is
> the reason behind of this calling on the class object, instead class
> instance object?

I don't know, but I would prefer self over the class name.

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to