>>>> all('') > True > > Actually the last one surprised me. I expected false. So maybe a resident > guru can explain that anomaly... I assume it works on the basis of testing > until it finds a false and so an empty sequence > always returns true...
The term you're thinking of is "vacuous truth" http://en.wikipedia.org/wiki/Vacuous_truth It's true that, for the empty collection, every element is true, since there are no counterexamples. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor