Following code works:
def f(n):
ln = range(n)
def condx(i):
return i % 2 == 0
return condx(n)
f(10)
Following variation does not:
def f(n):
ln = range(n)
def condx(i):
return i % 2 == 0
return [ i for i in ln if condx(i) ]
f(10)
=> ReferenceError: condx is not defined
Original issue reported on code.google.com by pedro.ro...@gmail.com on 5 Jan 2013 at 1:51
Original issue reported on code.google.com by
pedro.ro...@gmail.com
on 5 Jan 2013 at 1:51