Re: scared about refrences...



At Monday 30/10/2006 20:37, Nick Vatamaniuc wrote:

In Python all the primitives are copied and all other entities are
references.

What do you mean?
primitives==builtin classes?
entities==objects?
In Python, objects are never automatically copied, either builtin or user-defined. Even 123 is an object. Names provide references to objects.
Perhaps you were thinking of *another* language.


--
Gabriel Genellina
Softlab SRL

__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! ¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
.



Relevant Pages

  • Re: why cannot assign to function call
    ... The Python program deals solely with references; ... commonly understood in the field of programming language design. ... The argument passing model `pass-by-value' has a number of distinctive ...
    (comp.lang.python)
  • Re: Writing huge Sets() to disk
    ... that this code takes a lot of extra memory. ... > I believe it's the references problem, ... It's a bit unfortunate that all those instance variables are global to ... it merely aggregates it for use in storing new Python objects. ...
    (comp.lang.python)
  • Re: why cannot assign to function call
    ... The Python program deals solely with references; ... when you say "the Python program", ... The value of an array is the ...
    (comp.lang.python)
  • Re: why cannot assign to function call
    ... when you say "the Python program", ... talking about the program I write using the Python language, ... without using the concept of references (or anything ... No. I'm sticking to a single level of explanation. ...
    (comp.lang.python)
  • Re: memory leak problem with arrays
    ... I'm new to programming in python and I hope that this is the problem. ... I've created a cellular automata program in python with the numpy array ... Python keeps track of number of references to every object if the ... Sent message to the NumPy forum as per Roberts suggestion. ...
    (comp.lang.python)