Reasoning of calling a method on class object instead of class instance object
Ben Finney
ben+python at benfinney.id.au
Mon Mar 18 21:09:41 EDT 2019
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.
--
\ “A child of five could understand this. Fetch me a child of |
`\ five.” —Groucho Marx |
_o__) |
Ben Finney
More information about the Python-list
mailing list