daviis / PyDucker

A static ducking tool for python 3 source code
2 stars 2 forks source link

Global in deeper function not unset. #75

Open daviis opened 9 years ago

daviis commented 9 years ago

When there is a code block like

x = 0
def makeX():
    global x
    x = 1
    def makeY():
        x = 2
    makeY()
makeX()

The current implementation of scope look ups break because of shallow copies I think but I'm not sure when to remove the global/nonlocal reference.