python namespace question
Shashwat Anand
anand.shashwat at gmail.com
Tue Jul 13 23:19:20 EDT 2010
On Wed, Jul 14, 2010 at 8:33 AM, chad <cdalten at gmail.com> wrote:
> Given the following code...
>
> #!/usr/bin/python
>
> class cgraph:
> def printme(self):
> print "hello\n"
>
No need to do print "hello\n", python is not C, print "hello" prints hello
with a newline. Try it on interpretor.
>
> x = cgraph()
> x.printme()
>
>
> Does the function print() exist in the cgraph namespace or the
> printme() one?
>
Where exactly is the print() function here. BTW printme() is in cgraph
namespace.
~l0nwlf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100714/f25f4eda/attachment-0001.html>
More information about the Python-list
mailing list