Re: Interesting performance question

2019-09-29 Thread Terry Reedy
On 9/29/2019 9:45 AM, Eryk Sun wrote: On 9/29/19, Anthony Flury via Python-list wrote: Using python 3.6 building a tuple like this : my_tuple = tuple([x*x for x in range(1,1000)]) The list comprehension is implemented internally as a function that builds and returns the list. This function

Re: Interesting performance question

2019-09-29 Thread Eryk Sun
On 9/29/19, Anthony Flury via Python-list wrote: > > Using python 3.6 building a tuple like this : > > my_tuple = tuple([x*x for x in range(1,1000)]) The list comprehension is implemented internally as a function that builds and returns the list. This function creates an empty list and loops over