Question about Object Oriented + functions/global vars?

bruno modulix onurb at xiludom.gro
Tue Jun 7 10:31:07 CEST 2005


Christopher J. Bottaro wrote:
(snip)
> 1.  The upload function is not an object.

Yes it is. In Python, everything's an object.

>>> ftp.storbinary.__class__.__name__
'instancemethod'
>>> ftp.storbinary.foobar = 42
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
AttributeError: 'instancemethod' object has no attribute 'foobar'


-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list