I can access a functions' func_dict easily if I write its name inside it:
def func(a):
print('{} {}'.format(func.prefix, a))
func.prefix = 'something'
func(4)
Is there any way I can access prefix
without having to write func
again, similar to self
in class methods?