Hi!
I want to write simple code to find unbound variables.
As it's hard to detect them in common case it will mark them as:
- bound (defenitley bound)
def foo():
a = 1
print a
Bound variables should be initialized to NULL
- unbound (defenitley unbound)
def foo():
print a
a = 1
Unbound variables should be initialized to Py_None.
And user may be warned (should depend on command line flags)
- don't know (not sure here)
def foo(x):
if x:
a = 1
[else: # optional
a = 2]
print a
Algo is too stupid it don't know much about branches, so it's not sure here.
This ones will be initialized to Py_None.
Also I would like to check for unused variables and unreachable code
(this should be removed).
--
vitja.
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev