Minor correction to the correction: most variables are passed by reference. Scalar variables, e.g. integers and strings, are passed by value as in most other languages.
>>> def foo(bar):
... bar += 3
...
>>> baz = 5
>>> foo(baz)
>>> print baz
5
Submitted by Anonymous (not verified) on Thu, 12/01/2006 - 21:00.
Minor correction to the correction: most variables are passed by reference. Scalar variables, e.g. integers and strings, are passed by value as in most other languages.
Submitted by Anonymous (not verified) on Thu, 12/01/2006 - 21:00.>>> def foo(bar):
... bar += 3
...
>>> baz = 5
>>> foo(baz)
>>> print baz
5