Default scope of variables

Steven D'Aprano steve+comp.lang.python at pearwood.info
Thu Jul 4 17:52:22 CEST 2013


On Thu, 04 Jul 2013 03:06:25 -0400, Dave Angel wrote:

> On 07/04/2013 01:32 AM, Steven D'Aprano wrote:
>>
>        <SNIP>
>>
>> Well, if I ever have more than 63,000,000 variables[1] in a function,
>> I'll keep that in mind.
>>
>      <SNIP>
>>
>> [1] Based on empirical evidence that Python supports names with length
>> at least up to one million characters long, and assuming that each
>> character can be an ASCII letter, digit or underscore.
>>
>>
> Well, the number wouldn't be 63,000,000.  Rather it'd be 63**1000000
> 
> I probably have it wrong, but I think that looks like:
> 
> 
859,122,207,646,748,720,415,212,786,780,258,721,683,540,870,960,267,706,738,947,655,539,422,295,787,680,882,091,181,482,626,114,653,152,637,456,091,641,990,601,474,111,018,521,295,858,424,750,289,461,372,414,431,396,326,232,796,267,104,001
> 
> variables.  (The number has 180 digits)


I think that's more than 63,000,000 :-)


Thanks Dave and Peter for the correction.


-- 
Steven



More information about the Python-list mailing list