On Mon, Nov 17, 2014 at 3:17 PM, Dave Angel <da...@davea.name> wrote: > "Charles T. Smith" <cts.private.ya...@gmail.com> Wrote in message: > >> Well, I guess that's the definitive answer... the tips for delaying >> import are good, I'll try to leverage them. >> >> I was hoping there would be a way to have python postpone evaluation >> similar to C's forward references. >> > > In a module that might get tangled in a cycle, avoid global code > that depends on other modules. Instead of putting such > initialization at top level, put inside a function that gets > called after all suspect imports are completed. (That function > has global keywords ).
If the problem is that one of those modules would import the current module, then "after all suspect imports are completed" basically means after the current module has finished importing. So what would be responsible for calling such a function? -- https://mail.python.org/mailman/listinfo/python-list