Reply to comment

It wasn't wrong

His function wasn't wrong, he was just trying to show that Python doesn't pass by reference. If it did pass by reference, the = operator in func *would* change l.

Submitted by Brock (not verified) on Fri, 08/12/2006 - 00:01.

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.
3 + 4 =
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)