sgzwiz / brython

Automatically exported from code.google.com/p/brython
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Function scope difference with CPython #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This code :

a = range(5)
def f1():
    log(a)
    a = 2
f1()

raises an exception in CPython (local variable referenced before assignment) 
but not in Brython

(submitted by Nicolas Évrard)

Original issue reported on code.google.com by pierre.q...@gmail.com on 27 Nov 2012 at 9:55

GoogleCodeExporter commented 9 years ago
Partially fixed : the code raises a Javascript error "obj is undefined"

Original comment by pierre.q...@gmail.com on 16 Dec 2012 at 9:25

GoogleCodeExporter commented 9 years ago

Original comment by pierre.q...@gmail.com on 18 Dec 2012 at 9:18