Ticket #132 (closed defect: fixed)
Deletion of local variables in functions is not supported
|Reported by:||scoder||Owned by:||vitja|
|Component:||Pure Python Mode||Keywords:|
def test(): i = 1 del i
raises a compiler error. Supporting this might depend on better flow analysis.
A half-way-there implementation for local Python variables can be DECREF-ing them and setting them to NULL on "del", so that you'd get a compile time crash if you use them later on. This expects that users who use "del" know what they are doing.