[issue36980] pass-by-reference clues

2019-05-21 Thread stefan
stefan added the comment: Thank you for your reply and the lucid explanation.  On Monday, May 20, 2019, 9:15:42 PM EDT, Steven D'Aprano wrote: Steven D'Aprano added the comment: Hi Stefan, and welcome. This is not a help desk, you really should ask elsewhere for explanations of how

[issue36980] pass-by-reference clues

2019-05-21 Thread stefan
stefan added the comment: Thank you for your reply and the lucid explanation. On Monday, May 20, 2019, 9:17:34 PM EDT, Josh Rosenberg wrote: Josh Rosenberg added the comment: 1. This is a bug tracker for bugs in the Python language spec and the CPython interpreter, not a general pr

[issue36980] pass-by-reference clues

2019-05-20 Thread Josh Rosenberg
Josh Rosenberg added the comment: 1. This is a bug tracker for bugs in the Python language spec and the CPython interpreter, not a general problem solving site. 2. The ids will differ for changeValue2 if you actually call it (kernel = kernel + 2 requires the the old id of kernel differ from

[issue36980] pass-by-reference clues

2019-05-20 Thread Steven D'Aprano
Steven D'Aprano added the comment: Hi Stefan, and welcome. This is not a help desk, you really should ask elsewhere for explanations of how Python works. There are no bugs here: what you are seeing is standard pass-by-object behaviour. You are misinterpreting what you are seeing. Python is

[issue36980] pass-by-reference clues

2019-05-20 Thread stefan
New submission from stefan : I often get unexpected results when a called function results in a change in a variable because the function gets a pass by reference. For example, consider this snippet of code that manipulates the first column of a 3x3 matrix that it gets. ~