Terca variable = no se como definir una funcion :-)
Hernán Martínez Foffani
hernan en orgmf.com.ar
Jue Jun 9 16:09:22 CEST 2005
> GvR:
> """
> The actual parameters (arguments) to a function call are introduced in
> the local symbol table of the called function when it is called; thus,
> arguments are passed using call by value (where the value is always an
> object reference, not the value of the object).4.1 When a function
> calls another function, a new local symbol table is created for that
> call.
> Actually, call by object reference would be a better description,
> since if a mutable object is passed, the caller will see any changes
> the callee makes to it (items inserted into a list).
> """
>
> Por lo tanto, propone como más descriptivo "call by object reference",
> con intenciones didácticas.
Correcto. Sin embargo, a veces suelo evitar mencionar "referencia"
para no dar a entender que la referencia propiamente dicha
existe como entidad independiente del objeto.
> Pero de hecho, como él dice, el paso es por valor.
Mmmm... Creo que eso es rizar el rizo como dicen por aquí.
Al final, la referencia (no me refiero a python sino en general)
siempre termina siendo un valor. Con ese criterio no habría
lenguajes que usen "paso x referencia" a no ser que estén implementados
sobre CPU de registros especializados...
-H.
Más información sobre la lista de distribución Python-es