[Tutor] Another assert() question
Steve Willoughby
steve at alchemy.com
Sun Jul 13 20:44:38 CEST 2008
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.
More information about the Tutor
mailing list