2 May
2016
2 May
'16
1:41 a.m.
On Sun, May 1, 2016, at 21:36, Steven D'Aprano wrote:
On Sun, May 01, 2016 at 09:25:17PM -0400, Random832 wrote:
Is there any reason not to simply implement a performance optimization for the normal syntax?
Yes. You can't assume that myobject is the same object in both statements. A silly toy example: [snip] A more realistic case would be if you have a mutable object: [snip]
Well, by "normal" I meant assigning it to a temporary variable... and a local one, at that. Too bad there's no easy way to get a quick local scope without making a function, for stuff at the module level...