Currently in Cython, one can do
1 f(1) 2 3 def f(x): 4 print x
This doesn't work in Python. Also, if one does
1 def f(x): 2 return x 3 4 f = math.sin 5 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.
This doesn't work either:
1 class Bar(object): 2 CONST = 25 3 def foo(self, value=CONST): 4 print value
This gives a compile-time error.