syntax difference

Terry Reedy tjreedy at udel.edu
Sun Jun 24 14:58:12 EDT 2018


On 6/24/2018 11:39 AM, Bart wrote:

Bart, I agree that people should not dogpile onto you.  As with Rick, I 
read your posts or not, depending on whether I feel like being 
entertained at the moment, and usually move on without comment.

> I know I'm going to get flak for bringing this up this old issue,

"Getting flak" is apparently your goal.  This is called trolling.

> remember when you used to write a for-loop and it involved creating an 
> actual list of N integers from 0 to N-1 in order to iterate through 
> them? Crazy.

Yep.  We first fixed it in a backward compatible way, then in a code 
breaking way.  The second fix got some rough and rude flak: "This is the 
end of Python!!!"

> But that has long been fixed - or so I thought.

You thought right.

> When I wrote, today:

using an ancient version of Python,

>     for i in range(100000000): pass      # 100 million
> 
> on Python 2, it used up 1.8GB, up to the limit of my RAM, and it took 
> several minutes to regain control of my machine (and it never did 
> finish).
  > You don't expect that in 2018 when executing a simple empty loop.

And you don't get that when you use a 2018 version of Python, or even 
the newer 2008 version (3.0.0).  Are you really unaware of that?
> On Py 2 you have to use xrange for large ranges - that was the fix.

Yep. This was the backward compatible fix.  So what is your point?

> Somebody however must have had to gently and tactfully point out the 
> issue. 

For all I know, the craziness of the original design may have prompted 
some rough and rude comments *BEFORE IT WAS FIXED*.  Possibly ditto for 
the clutziness of the fix -- *BEFORE THE FIX WAS FIXED*.

> I'm afraid I'm not very tactful.

The above seems politely worded to me.  It is just 20 and 10 years too 
late, and completely pointless, unless 'flak' is your goal.

-- 
Terry Jan Reedy





More information about the Python-list mailing list