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
Post a Comment