Pointers

Oleg Broytmann phd at phd.russ.ru
Mon Mar 20 08:50:07 EST 2000


On Mon, 20 Mar 2000, D-Man wrote:
> Would I be correct if I said that Python always uses pointers and never

   yes.

> makes a copy of an object unless explicitly requested using copy()?

   Or similar mechanism. For example, list can be copied by

new_l = l[:]

   This is "shallow" copy - it copies only pointers. Standard module "copy"
can do both shallow and deep copying.

Oleg.
---- 
    Oleg Broytmann      Foundation for Effective Policies      phd at phd.russ.ru
           Programmers don't die, they just GOSUB without RETURN.





More information about the Python-list mailing list