How to break out of two nested for loops?

Kragen Sitaker kragen at pobox.com
Wed Jan 23 04:28:49 EST 2002


"Francois Petitjean" <littlejohn.75 at free.fr> writes:
> import B
> B is bound to module B (in the A namespace). How, in module B, to write a
> function which returns a tuple with moduleB and an object defined in B?

I'm not sure that's a good idea, but you could probably write
import sys
return sys.modules['B'], someotherobject

> And is using the same word (Interpreter) for a module (Interpreter.py) anda
> class, an issue?

No, that's fine.




More information about the Python-list mailing list