Assignment Versus Equality

Lawrence D’Oliveiro lawrencedo99 at gmail.com
Tue Jun 28 20:42:48 EDT 2016


On Tuesday, June 28, 2016 at 10:35:21 PM UTC+12, Chris Angelico wrote:
> On Tue, Jun 28, 2016 at 6:49 PM, Lawrence D’Oliveiro wrote:
> > On Tuesday, June 28, 2016 at 7:26:30 PM UTC+12, Chris Angelico wrote:
>>> Why not:
>>>
>>> if (error) goto cleanup;
>>> ...
>>> cleanup:
>>> do_cleanup;
>>
>> They all fall into that same trap. Doesn’t scale. Try one with
>> allocation inside a loop, e.g. lines 488 onwards.
> 
> How is that different? You can use a goto inside a for loop just fine.

You have my code; show us how you can do better.



More information about the Python-list mailing list