The � debate

Marko Rauhamaa marko at pacujo.net
Sat May 10 04:21:54 EDT 2014


Chris Angelico <rosuav at gmail.com>:

> On Sat, May 10, 2014 at 5:48 PM, Steven D'Aprano
> <steve+comp.lang.python at pearwood.info> wrote:
>>> https://en.wikipedia.org/wiki/Assignment_(computer_science)
>>>
>>> Go ahead, start an edit war at that page over its use of "variable". :)
>>> Right there it talks about copying values into variables. So if Python
>>> has no variables, then either that article is inappropriate, or Python
>>> has no assignment either.
>>
>> Python assignment doesn't copy values.
>
> So either the article is wrong, or Python doesn't have assignment.
> Which is it?

You can understand copying more liberally:

   assignment   -- 0-level copy
   shallow copy -- 1-level copy
   deep copy    -- infinite-level copy

Real programs occasionally need 2-level or n-level copies.


Marko



More information about the Python-list mailing list