micropython

Annotated tests/failure/shadow_locals_builtins_conflict.py

432:1964e5898e68
2011-06-14 Paul Boddie Fixed negation of operator method results in other operator methods. Added NotImplementedType as an automatically generated class.
paul@362 1
#!/usr/bin/env python
paul@362 2
paul@362 3
def test():
paul@362 4
    x = [1, 2, 3]
paul@362 5
    if x:
paul@362 6
        y = len(x)
paul@362 7
    else:
paul@362 8
        def len(arg):
paul@362 9
            return 0
paul@362 10
paul@362 11
    return len(x)
paul@362 12
paul@362 13
test()
paul@362 14
paul@362 15
# vim: tabstop=4 expandtab shiftwidth=4