preemptive OOP?

MonkeeSage MonkeeSage at
Sun Oct 1 00:34:18 CEST 2006

John Salerno wrote:
> LOL. Yeah, I guess so. I kind of expected the answer to be "yes, always
> go with OOP in preparation for future expansion", but I should have
> known that Python programmers would be a little more pragmatic than that. :)

Depends on the design philosophy of a particular programmer. YAGNI and
extreme programming are one approach. But, personally, I take that more
as a suggestion not a rule. For example, I don't *need* startswith:

s = 'Cat in a tree'
f = 'Cat'
if s[0:len(f)] == f:

But I'm glad startswith is there because it makes it easier for me to
understand what's going on and to use literals rather than temporary

if s.startswith('Cat'):


More information about the Python-list mailing list