0

In C++ you can hand over the data address of an instance to directly manipulate the variable, rather than a copy of that variable. Is there anything like this in Python (3+) that allows me to directly manipulate a variable in one function from another without making it global, or returning a copy of it? Thanks, hope this isn't a dupe post, if so sorry.

Also Merry Christmas and/or Happy Holidays!

Joseph Long
  • 153
  • 1
  • 2
  • 10
  • Search your favorite C++ reference for "pass by reference". Prefer *references* to pointers. Also search for "c++ smart pointers". – Thomas Matthews Dec 24 '16 at 04:07
  • In Python, to quote [wim](http://stackoverflow.com/questions/9696495/python-when-is-a-variable-passed-by-reference-and-when-by-value#comment12322579_9696495): *"Everything is passed by value, but every value is just a reference"* – WhiZTiM Dec 24 '16 at 04:10

0 Answers0