pythonic way to optimize access to imported value?
Lexy Zhitenev
zhitenev at cs.vsu.ru
Wed Nov 13 04:20:33 EST 2002
"Greg Ewing" <see_reply_address at something.invalid> wrote:
> ... Maybe
>
> def foo():
> const m = math
> return m.pi
>
> The "const" statement would be evaluated when
> the "def" was executed, and "m" would appear in the
> local namespace when the function was called.
>
> Although "const" might not be the best name for
> it, since it's not really a constant, more like
> a local with an initial value.
>
What is this 'const' name? I haven't ever heard of this in Python.
More information about the Python-list
mailing list