News for hackers. Stuff that matters.
Re:What Elm and Haskell are teaching mainstream JS [video] by sophacles on Tuesday December 01, 2015 @04:35PM (#10658976)
Note - in python3 variable shadowing is much more controllable - in your example having modify_n look like:

    def modify_n(new_value):
       nonlocal n
(and of course the print x -> print(x) changes), will result in 4,7,7

There are no comments on this comment yet.