firstlist = [listItem[:12] for listItem in firstList] ^ when I meant
firstList = [listItem[:12] for listItem in firstList] ^ doh!
Later, I realized that I should have run it through Pychecker which would have picked it up immediately.
With that experience of learning the hard way, I'd recommend that you always run your code through Pychecker just after editing it and before running it.
In Perl, you can perl -c somehardtoreadperlprogram.pl that will just check the syntax. The above problem would have been caught in Perl since I always use strict. Is there a command line option in Python to do a Pychecker-like syntax check? I see a -t to check the tabs, but nothing to tell it to check the syntax but don't run it. If not, should Pychecker be part of the standard distribution? Am I missing something?
Mike
Go ahead and reply to me AND the list since I just get the digest.
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor