Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python faq call by reference

>>> def func1(a, b):
...     a = 'new-value'        # a and b are local names
...     b = b + 1              # assigned to new objects
...     return a, b            # return new values
...
>>> x, y = 'old-value', 99
>>> func1(x, y)
('new-value', 100)
Source by docs.python.org #
 
PREVIOUS NEXT
Tagged: #python #faq #call #reference
ADD COMMENT
Topic
Name
4+8 =