Hi, I just figured out this with Python3.2 IDLE: >>> class k: pass >>> x=k() >>> x.thing = 1 >>> x.thing 1 >>> x = x.thing = 1 Traceback (most recent call last): File "<pyshell#7>", line 1, in <module> x = x.thing = 1 AttributeError: 'int' object has no attribute 'thing' >>> x 1 >>>
================ when I do x=x.thing=1, I thought it would be like in C, 1 is first assigned to x.thing, then it is further assigned to x. But what seems to be going on here is that 1 is first assigned to x, then to x.thing (which causes an error). Any reason why would Python deviate from C in this regard? Thanks! Yingjie -- http://mail.python.org/mailman/listinfo/python-list