Jethro added the comment:

I'm not confused. In my first report, I have already explained why python 
behaves that way. My point is, this is not the right way to go. Because the 
very same self.tot in the in-place operation self.tot+=a is first resolved to 
be the class field, then an instance field. This is against any sensible design 
of a language. If this is OK, then my second example should also be OK. In my 
second example, tot += x, the very same tot can be first resolved to the global 
variable tot, then the result is assigned to a local variable.

----------
resolution: not a bug -> 
status: closed -> open

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23824>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to