I already reported some examples in #369 where monty reports errors for valid python code.
This issue is a collection of multiple code samples with similar issues with global-statements.
code:
async def name_0():
lambda: name_2
global name_2
(name_2 := 0)
monty:
name 'name_2' is used prior to global declaration
python:
no exception
async def name_1():
lambda: name_4
global name_4
for name_4 in 0:
pass
monty:
name 'name_4' is used prior to global declaration
python:
no exception
def name_4():
try:
lambda: name_5
global name_5
except:
pass
finally:
name_5 = 0
monty:
name 'name_5' is used prior to global declaration
python:
no exception
def name_2():
async def name_4():
name_3
global name_3
def name_3():
pass
monty:
name 'name_3' is used prior to global declaration
python:
no exception
async def name_3():
try:
lambda: name_1
except:
pass
finally:
global name_1
import name_1
monty:
name 'name_1' is used prior to global declaration
python:
no exception
def name_0():
import name_0 as name_3
global name_3
monty:
name 'name_3' is used prior to global declaration
python:
no exception
def name_5():
try:
pass
except name_1:
pass
else:
global name_1
monty:
name 'name_1' is used prior to global declaration
python:
no exception
async def name_0():
lambda: name_2
global name_2
(name_2 := 0)
monty:
name 'name_2' is used prior to global declaration
python:
no exception
This zip contains all the examples which I found: bugs.zip. It can contain duplicates and only some of them are listed above.
I already reported some examples in #369 where monty reports errors for valid python code.
This issue is a collection of multiple code samples with similar issues with global-statements.
code:
monty:
python:
no exception
monty:
python:
no exception
monty:
python:
no exception
monty:
python:
no exception
monty:
python:
no exception
monty:
python:
no exception
monty:
python:
no exception
monty:
python:
no exception
This zip contains all the examples which I found: bugs.zip. It can contain duplicates and only some of them are listed above.