The “does Python have variables?” debate

Marko Rauhamaa marko at pacujo.net
Wed May 7 10:17:23 EDT 2014


Ethan Furman <ethan at stoneleaf.us>:

> On 05/06/2014 11:18 PM, Marko Rauhamaa wrote:
>> Actually, while Python variables are not first-class objects, one
>> could see them as dictionary-key pairs. So you can even pass them by
>> reference by passing the dictionary and the key.
>
> Well, you could pass them that way, but not necessarily change them:

Weird. Some other tests of mine did work. But:

   Note: The contents of this dictionary should not be modified; changes
   may not affect the values of local and free variables used by the
   interpreter. [<URL:
   https://docs.python.org/2/library/functions.html#locals>]


Marko



More information about the Python-list mailing list