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 ronaldoussoren
Recipients andy.chugunov, flox, mark.dickinson, r.david.murray, ronaldoussoren
Date 2013-05-20.11:39:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1369049986.78.0.398842684049.issue17973@psf.upfronthosting.co.za>
In-reply-to
Content
issue-17973-experimental.txt is a very crude first attempt at catching augment assignment to an immutable LHS. On first glance the code works, but it causes problems in the test suite and hence isn't correct yet. The generated code also isn't optimal, the LHS is evaluated too many times.

With the patch ``([],)[0] += ['a']`` raises an exception, and doesn't update the list. 

I also haven't done benchmarking of the code, I'd expect a slowdown in micro benchmarks for augmented assignment when the LHS isn't a simple name because there is more byte code (``a[0] += b`` disassembly expands from 8 to 14 lines).
History
Date User Action Args
2013-05-20 11:39:46ronaldoussorensetrecipients: + ronaldoussoren, mark.dickinson, r.david.murray, flox, andy.chugunov
2013-05-20 11:39:46ronaldoussorensetmessageid: <1369049986.78.0.398842684049.issue17973@psf.upfronthosting.co.za>
2013-05-20 11:39:46ronaldoussorenlinkissue17973 messages
2013-05-20 11:39:46ronaldoussorencreate