Bitten by my C/Java experience

Mark Lawrence breamoreboy at yahoo.co.uk
Mon May 4 13:59:17 EDT 2015


On 04/05/2015 16:20, Cecil Westerhof wrote:
> Potential dangerous bug introduced by programming in Python as if it
> was C/Java. :-(
> I used:
>      ++tries
> that has to be:
>      tries += 1
>
> Are there other things I have to be careful on? That does not work as
> in C/Java, but is correct syntax.
>

Not dangerous at all, your test code picks it up.  I'd also guess, but 
don't actually know, that one of the various linter tools could be 
configured to find this problem.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence




More information about the Python-list mailing list