2007-01-06 | paulb | file changeset files shortlog | Added support for functions referencing themselves. Added local scope indication in the viewer (showing local/nested classes and functions). Added tests of nested classes and functions. |
paulb@169 | 1 | def f(): |
paulb@169 | 2 | def g(x): |
paulb@169 | 3 | if x <= 0: |
paulb@169 | 4 | return x |
paulb@169 | 5 | return g(x - 1) + x |
paulb@169 | 6 | return g |
paulb@169 | 7 | |
paulb@169 | 8 | a = f() |
paulb@169 | 9 | b = a(3) |