I have seen python functions defined within other function like this:
def une_fonction(fonction):
def autre_fonction(*param, **param2):
print "Action avant .............. "
fonction(*param, **param2)
print "Action après .............."
return autre_fonction
- Anyone can tell me where I can find official documentation or tutorials on this?
- Why and how are they used?