When accessing a static method from a regular instance method in a Python class, there are 2 different options which both seem to work - accessing via the self object, and accessing via the class name itself, e.g.
class Foo:
def __init__(self, x: int):
self.x = x
@staticmethod
def div_2(x: int):
return x / 2
def option_1(self):
return Foo.div_2(self.x)
def option_2(self):
return self.div_2(self.x)
Is there any reason for preferring one way over the other?