My code is like this:
class XQ(object):
def _XP(x, rettype='string'):
@staticmethod
def wrapper(*args, **kwargs):
print "args: ", str(args)
print "x: ", x
return wrapper
something = _XP('adios')
and I do:
j = XQ()
j.something(5)
and the output is:
args: (5,)
x: adios
I do not understand how args gets to that value in the wrapper function, when _XP only has two arguments. I understand the use of * args and * kargs (I think), but I do not know how I received the inner function.
That 5 is not 'x', nor 'rettype' and I do not know how it reaches the other function
Could someone explain?