I have a class (named MyClass) with a function (named MyFunct).
when I print it, it's ok but when I use .format I have some issues:
class MyClass:
var = 2
def MyFunct(numb):
return numb + 1
print(MyClass.var)
>>> 2
print(MyClass.MyFunct(5))
>>> 6
print("{.var}".format(MyClass))
>>> 2
print("{.MyFunct(5)}".format(MyClass))
>>> AttributeError: type object 'MyClass' has no attribute 'MyFunct(5)'
I need to use .format for some reason, and I would like to add posibility to add function :/
Thanks for you'r help <3 !