Let's say I have a class (in python3.6)
class Testing:
def __init__(self, stuff):
self.stuff = stuff
@staticmethod
def method_one(number):
"""My staticmethod"""
return number + 1
def method_two(self):
"""Other method"""
number = 10
# option A
self.method_one(number)
# option B
Testing.method_one(number)
What is more python here?
- option A, using the
self
var - option B, using the class itself
I tend to think A, but I am unsure and couldn't find a solid answer on the topic