Are circular dependencies possible in Python?

Tim Tyler tim at tt1lock.org
Sat Apr 9 12:52:41 EDT 2005


Tim Tyler <tim at tt1lock.org> wrote or quoted:

> Like C, Python seems to insist I declare functions before calling
> them - rather than, say, scanning to the end of the current script
> when it can't immediately find what function I'm referring to.
> 
> C lets you predeclare functions to allow for the existence of
> functions with circular dependencies.
> 
> Does Python allow you to do something similar?
> 
> If not how do you create functions with circular dependencies in
> Python - where function A could call function B; and function
> B could call function A - or is that not possible?

Thanks guys - that's made how Python works in this area abundantly clear.
-- 
__________
 |im |yler  http://timtyler.org/  tim at tt1lock.org  Remove lock to reply.



More information about the Python-list mailing list