Reply to comment

Small correction

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.

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
6 + 0 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

Google ads

(You can disable these if you log in)