[Newby] question about modules
Batista, Facundo
FBatista at uniFON.com.ar
Fri Dec 10 14:10:08 EST 2004
[Jon]
#- gives me the following error: NameError: name 'capwords' is
#- not defined
#-
#- As far as I can tell from the online docs, "capwords" should
#- be defined in
#- the built-in "regex" module. Why is it telling me that
#- capwords is not
#- defined?
So you have to call it "regex.capwords".
It's a namespace issue, the function is defined inside the module, so you
have to explicitly write it.
Considering the question, I think you would make a good use of the tutorial:
http://docs.python.org/tut/tut.html
. Facundo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20041210/b2a466a4/attachment.html>
More information about the Python-list
mailing list