Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 8
    \$\begingroup\$ A small caution: if a list that is passed in as an optional argument is modified in the function (like with pop or l[0] =1), that list will be changed in the outer scope too. \$\endgroup\$ Commented Aug 22, 2014 at 0:14
  • 1
    \$\begingroup\$ Also, this is only needed if the function body contains nested block statements; otherwise, you can just put everything on one line to avoid indentation. \$\endgroup\$ Commented Sep 26, 2014 at 1:55