make order of function definitions irrelevant
peter at engcorp.com
Mon Nov 10 19:57:50 CET 2003
Joerg Schuster wrote:
> according to
> the order of function definitions does matter in python. Does anyone
> know a trick to avoid this?
> Is there a way to "declare" functions without defining them?
> (Making the order of function definitions irrelevant would be useful
> for automatically generated python scripts.)
No, it would not.
Basically, the problem you believe is here is not a problem
in actual practice. You could add declarations to Python-the-language,
but they're irrelevant until the function is actually called.
When the function is called, it has to have been defined (not just
declared) and so the declaration would be completely redundant.
More information about the Python-list