Is it possible to declare functions in python and define them later or in a separate file?
I have some code like:
class tata:
def method1(self):
def func1():
# This local function will be only used in method1, so there is no use to
# define it outside.
# Some code for func1.
# Some code for method1.
The problem is that the code becomes messy and difficult to read. So I wonder if it's possible for instance to declare func1
inside method1
and define it later?