RE: [Cheetahtemplate-discuss] #from ... import * not supported
Brought to you by:
rtyler,
tavis_rudd
From: Edmund L. <el...@in...> - 2002-04-09 17:10:57
|
Mike wrote: >The compiler generates a bare variable name rather than a VFS call if it >finds a local variable or builtin by that name. But with >"from ... import *", it doesn't have any names to go on. It could do >the import I s'pose and look, but currently neither Cheetah nor Python >do imports at compile time, and you've never been required to have >external modules available at compile time. I understand what you mean. IOW, without doing an import, the compiler doesn't have any means of determining where to--in effect--bind the variable name to. Hmmm. The only way out does seem to be to do an import first (which could potentially mess up the compiler's namespace), or else provide some other way to specify which variables get bound to which modules. But this won't work when there are two or more * imports... I can't think of a decent solution to this either. ...Edmund. |