Is it possible to have a function that not only behaves like a @staticmethod wrapped function but also like any other class function so that if one calls the function through an instance, the data from the instance can be passed?
example:
class Amazing(object):
@static_and_class
def func(x):
return type(x)
apple = Amazing()
>>> print(apple.func())
>>> <class 'Amazing'>
>>> print(Amazing.func(2))
>>> <class 'int'>
That's a basic example of the system. Basically, what I want is a way to pass information like instance data if possible, but if the data was not there the function would take the necessary variables to execute its program.
Thanks to anyone who can solve this!!