Is there any way to do forward referencing or function prototyping in python..?
Being an interpreted language, is lack of forward referencing a drawback of python?
Jump to Post
To avoid problems define all your functions in the beginning of a program (more readable anyway!) ...
def f1(): print('f1') # call function f2 f2() def f2(): print('f2') f3() def f3(): print('f3') # all function have been defined # now this will work f1()
This will give …
All 2 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.