Word frequencies -- Python or Perl for performance?
Anders M Eriksson
anders.eriksson at morateknikutveckling.se
Fri Mar 22 05:48:30 EST 2002
Hello Jim!
I tried to run the program in Python 2.1 but I get errors
>if __name__ == '__main__':
> wcount = Wordcount()
> for i in sys.argv[1:]:
> file = open(i,"r")
> for line in file:
Here I get the error ^
for line in file:
TypeError: loop over non-sequence
Is this something specific for Python 2.2, or just a typo?
// Anders
More information about the Python-list
mailing list