Dick Moores wrote:
Yes! A rule, not logic. I'm not contradicting Kent, just helping myself understand. First the rule, then logic in the application of the rule. And I assume the rule is there in Python because it makes things work better.
Yes, so a statement like "if foo:" becomes an idiom for "if the collection foo has stuff in it:" which is handy whether foo is a text string or a list of objects.
Yes, I've been using that, a bit uneasily.
One question about the data I listed. Why is bool(set([])) false, whereas bool([[]]) is true?
Dick
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor