[Tutor] iter class

Peter Otten __peter__ at web.de
Thu Jan 23 09:09:26 CET 2014


Keith Winston wrote:

> On Thu, Jan 23, 2014 at 12:21 AM, Devin Jeanpierre
> <jeanpierreda at gmail.com> wrote:
>> in Python 3, it should be __next__, not next.
> 
> Ah! That's it! Thanks!!!
> 
>> I'd suggest staying away from any old blog posts and articles, unless
>> you'd care to learn Python 2.x instead of 3.x. ;)
> 
> Yeah, but this is a REALLY GOOD resource. But your point is
> well-taken: on the simple stuff, i.e. print statements, I can see the
> difference quickly. I suppose I should practice running my questions
> on old code through 2to3 before I pester the Tutor list, since that's
> probably also a good way to learn the differences.

Yes, that would have worked here. 

But why not install Python 2.7 on your machine, too? That would allow you 
run the examples as is.



More information about the Tutor mailing list