Currently in Cython, one can do
#!python f(1) def f(x): print x
This doesn't work in Python. Also, if one does
#!python def f(x): return x f = math.sin print f(10)
it doesn't do the same things as Python either.
We should probably at least simulate the correct behavior, without sacrificing the compile-time linking of module-level functions.
[:enhancements/scope/transformimpl: One approach to implementation]
This doesn't work either:
#!python class Bar(object): CONST = 25 def foo(self, value=CONST): print value
This gives a compile-time error.