This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients benjamin.peterson, chupym, r.david.murray
Date 2013-02-01.14:35:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1359729303.64.0.369882498196.issue17022@psf.upfronthosting.co.za>
In-reply-to
Content
Well, it is consistent with plain reasoning if you remember that (a) python is a dynamic language and (b) python assignments do not return values (this is a core principle in the language design), which means that (c) the chained assignment form is a shorthand.  Of course, you do then have to look up what it is a shorthand *for*, but if you approached another language's chained assignment with a Python mindset, you'd also have to look it up to find out what rules applied to that language.

It is hard not to make assumptions based on other languages you've learned.  Interestingly, when I did a quick google for what other languages do for chained assignment I didn't come up with much.  Looks like most don't support it, or if they do they do so as a side effect of an assignment returning a value.

So, yes, Python is a unique language.  There are usually good underlying reasons for the various design decision made (not always, but very very often).
History
Date User Action Args
2013-02-01 14:35:03r.david.murraysetrecipients: + r.david.murray, benjamin.peterson, chupym
2013-02-01 14:35:03r.david.murraysetmessageid: <1359729303.64.0.369882498196.issue17022@psf.upfronthosting.co.za>
2013-02-01 14:35:03r.david.murraylinkissue17022 messages
2013-02-01 14:35:03r.david.murraycreate