On 17 Jul 2012 12:39, "Mark Lawrence" <breamore...@yahoo.co.uk> wrote: > > On 17/07/2012 16:28, Paul McNally wrote:
<snip enough context to perhaps have lost attributions> >> I was able to get it working like this... >> >> password = "foobar" >> attempt = 0 >> while (password != "unicorn") and (attempt <= 3): > > > Please we're talking Python here not C so strip out those unneeded parenthesis. Not so sure I agree. Python doesn't need them, but I often find code easier to parse when the scope of binary operators is made clear via parens. The precedence order of python is just one more thing to recall (and is fighting for space in my head with precedence orders for a bunch of formal languages). A bit of extra typing can save a second or cognitive lag each time the line is read. Best, Brian vdB
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor