Thank you both, Steven and Andrew, for the insightful explanation. I
shall keep it in mind when thinking about classes methods and
instances. Thank you again.
Manu
--
http://mail.python.org/mailman/listinfo/python-list
Emanuele D'Arrigo man...@gmail.com (ED) wrote:
ED Hi Everybody!
ED I just tried this:
class C(object):
ED ...def method(self):
ED ...pass
ED ...
c = C()
delattr(c, method)
ED Traceback (most recent call last):
ED File stdin, line 1, in module
ED AttributeError: 'C' object
Emanuele D'Arrigo wrote:
Hi Everybody!
I just tried this:
class C(object):
...def method(self):
...pass
...
c = C()
delattr(c, method)
Traceback (most recent call last):
File stdin, line 1, in module
AttributeError: 'C' object attribute 'method' is read-only
How come?
On Thu, 02 Apr 2009 06:07:20 -0700, Emanuele D'Arrigo wrote:
Hi Everybody!
I just tried this:
class C(object):
...def method(self):
...pass
...
c = C()
delattr(c, method)
Traceback (most recent call last):
File stdin, line 1, in module
AttributeError: 'C' object