call by reference howto????

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Wed Feb 27 20:27:23 EST 2008


En Wed, 27 Feb 2008 22:02:19 -0200, Tamer Higazi <no at mail.de> escribió:

> Can somebody of you make me a sample how to define a function based on
> "call by reference" ???
>
> I am a python newbie and I am not getting smart how to define functions,
> that should modify the variable I passed by reference.

First read this article http://effbot.org/zone/python-objects.htm and then  
this one http://effbot.org/zone/call-by-object.htm

There is a FAQ entry at  
http://www.python.org/doc/faq/programming/#how-do-i-write-a-function-with-output-parameters-call-by-reference

The Google interface is good for searching past messages on this topic:  
http://groups.google.com/group/comp.lang.python/

-- 
Gabriel Genellina




More information about the Python-list mailing list