Python's translation of C#'s "ref" keyword? -


in c#, keyword ref can force value types passed reference. so:

class refexample {     static void method(ref int i)     {         = + 44;     }      static void main()     {         int val = 1;         method(ref val);         console.writeline(val);         // output: 45     } } 

question: idiomatic way translate method python?


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -