can someone tell me about...
Robin Dunn
robin at alldunn.com
Tue Apr 18 16:47:53 EDT 2000
> Interactively, python will recognize a variable name that begins with
> one underscore (_myVar). The variable naming rules even say that is
> acceptable.
>
> However, when I try to use it in a module, it bombs.
>
When you say "use it in a module" do you mean like this:
from the_module import *
print _myVar
If so then that is normal as names begining with an underscore are not
imported with the *, (it's a way to help prevent namespace pollution.) On
the other hand, this should work:
import the_module
print the_module._myVar
--
Robin Dunn
Software Craftsman
robin at AllDunn.com
http://AllDunn.com/robin/
http://AllDunn.com/wxPython/ Check it out!
More information about the Python-list
mailing list