Newbie Class/Counter question

Michael Tobis mtobis at gmail.com
Tue Mar 14 23:36:11 EST 2006


Paul, thanks for the enlightening intro to pyparsing!

We don't really know what the application is (I suspect it's homework),
but whether it's homework or a real-world one-off this all seems like
overkill to me. There's a time for elegance and a time for quick and
dirty. Assuming line oriented input as shown, I can do it in 9 simple
lines (or 7, if there is no "level3" or higher case) with no imports,
no regular expressions, and no user defined classes. However, I hate to
submit someone's homework.

Anyway, Provo seems confused, and should focus more on technique, I
think. Remember that "simple is better than complex" and "readability
counts". Try to find a way to take smaller steps toward your goal.

mt




More information about the Python-list mailing list