Greg Ewing <greg.ew...@canterbury.ac.nz> writes: > On 11/08/21 3:22 pm, Terry Reedy wrote: >> Python is a little looser about whitespace than one might expect >> from reading 'normal' code when the result is unambiguous in that it >> cannot really mean anything other than what it does. >> >>> if3: print('yes!') >> yes! > > That may not be doing what you think it's doing. Consider also > >>>> if0: print('yes!') > yes!
So, yes, that's puzzling. >>> 0 == False True >>> if0: print("yes") yes >>> if(0): print("yes") >>> What's going on there? -- https://mail.python.org/mailman/listinfo/python-list