Word frequencies -- Python or Perl for performance?

Oleg Broytmann phd at phd.pp.ru
Fri Mar 22 06:04:20 EST 2002


On Fri, Mar 22, 2002 at 11:48:30AM +0100, Anders M Eriksson wrote:
> >		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?

   Yes, 2.2 only.

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.




More information about the Python-list mailing list