Newbie asks about static variables...
William Tanksley
wtanksle at dolphin.openprojects.net
Wed May 5 21:32:17 EDT 1999
On Tue, 04 May 1999 20:44:16 +0200, Martijn Faassen wrote:
>Well, using a global variable would indeed be one way. One need not be
>as worried with global variables in Python, as there's a nice module
>system that puts them in their own namespaces. If you prepend your
>global variable with a _ then it doesn't get imported, even if you use
>'from <module> import *'.
You know, I've heard of a lot of very knowledgable people say that _ is
the prefix for hiding names, but when I tried it it didn't work.
Looking in the manual, I see that it claims that __ is the correct prefix;
and indeed, this seems to work.
So... What am I missing?
>Martijn
--
-William "Billy" Tanksley
"But you shall not escape my iambics."
-- Gaius Valerius Catullus
More information about the Python-list
mailing list