Re: help with class

2008-11-26 Thread Chris Rebert
On Wed, Nov 26, 2008 at 5:21 PM, tekion <[EMAIL PROTECTED]> wrote: > Hi, > so I am assuming global name space refers to the location of where the > module is imported, for example my previous example where I call the > gzip module from test_class class, like so: > > class test_class: > import gzi

Re: help with class

2008-11-26 Thread tekion
Hi, so I am assuming global name space refers to the location of where the module is imported, for example my previous example where I call the gzip module from test_class class, like so: class test_class: import gzip did not work because of scoping. So global name space in this case is declar

Re: help with class

2008-11-26 Thread r
On Nov 26, 4:08 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > tekion <[EMAIL PROTECTED]> writes: > > Hello, > > I am playing with class.  Below is the code snippet: > > #!/usr/bin/python > >       2 > >       3 class test_class: > >       4    #import gzip > >       5    def __init__(self,file)

Re: help with class

2008-11-26 Thread Arnaud Delobelle
tekion <[EMAIL PROTECTED]> writes: > Hello, > I am playing with class. Below is the code snippet: > #!/usr/bin/python > 2 > 3 class test_class: > 4#import gzip > 5def __init__(self,file): > 6 self.file = file > 7def open_file(self): > 8

help with class

2008-11-26 Thread tekion
Hello, I am playing with class. Below is the code snippet: #!/usr/bin/python 2 3 class test_class: 4#import gzip 5def __init__(self,file): 6 self.file = file 7def open_file(self): 8 try: 9 print "file: %s" % self.file

Interactive use of Help with class/instance data

2005-09-09 Thread Colin J. Williams
help(instance.property) gives the same information as help(instance) but help(cls.property) gives information specific to the property. Is this a bug? Colin W. -- http://mail.python.org/mailman/listinfo/python-list