@feature(const, constexpr)
def f():
x: const = 1
def g():
return x
return g()
f()()
The above codes raise NameError now for constant symbol x doesn't exists here.
In the very first beginning I've made a decision that not allow to affect the nested sub-closures in a featured closure(which means the function annotated by @feature(xxx)). However I just found some use cases and if I don't make it possible to inherit further effects from a featured closure.
The only way now to make general constants(in Python it stands for a constant which could be made from a variable.) have to be performed in runtime which costs heavily. For applying deep bytecode optimization now I think there should be a way for nested closures to inherit effects from featured closure.
The above codes raise
NameErrornow for constant symbolxdoesn't exists here.In the very first beginning I've made a decision that not allow to affect the nested sub-closures in a featured closure(which means the function annotated by
@feature(xxx)). However I just found some use cases and if I don't make it possible to inherit further effects from a featured closure.The only way now to make general constants(in Python it stands for a constant which could be made from a variable.) have to be performed in runtime which costs heavily. For applying deep bytecode optimization now I think there should be a way for nested closures to inherit effects from featured closure.