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

angular - DownloadURL return null in below code -

meteor - inserting data to database gives error "insert failed: Method '/texts/insert' not found" -