l = range(int(1E9))

Cecil Westerhof Cecil at decebal.nl
Thu Apr 30 20:44:48 CEST 2015


Op Thursday 30 Apr 2015 19:41 CEST schreef Ben Finney:

> Cecil Westerhof <Cecil at decebal.nl> writes:
>
>> That works, yes. Now I get a MemoryError and the other processes
>> are left alone. Now determining what are the best values.
>
> I would strongly recommend that “best values” includes “run Python
> version >= 3”.
>
> One of the many problems you avoid by leaving Python 2 behind is
> that many functions which used to return entire collections, now
> return lazy evaluators (such as generators or views) which will not
> consume memory the way you're describing.
>
> Please try to learn Python using only the currently-developed Python
> 3.

The problem with that is that in my neighbourhood 2 is still mostly
exclusively used. I want to learn also 3, but 2 has more priority.

The modules I publish on GitHub work with both. :-)

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof



More information about the Python-list mailing list