[Python-Dev] Q: playing with 2.2a1 => strange behaviour, or misunderstanding

Samuele Pedroni pedroni@inf.ethz.ch
Mon, 20 Aug 2001 02:49:35 +0200


I have tried this with 2.2a1:
1. I have not checked the related C code
2. I have not checked the bug report list

>>> class C(object): pass
...
>>> c=C()
>>> c.a=3
>>> object.__getattr__(c,'a')
3
>>> object.__setattr__(c,'a',6)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: function takes exactly 2 arguments (3 given)

Is that meaningful or a problem?
I'm trying to understand type/class unification to consider possible jython
issues.

regards, Samuele Pedroni