micropython

Annotated tests/failure/keyword_repeat.py

299:feccb2b0967e
2010-02-08 Paul Boddie Added control-flow branch abandonment for statements like break, continue, raise and return, preventing attribute usage from such branches from contributing to subsequent usage observations. Split the initial attribute usage test into smaller tests. Added notes about testing guard suitability.
paul@58 1
#!/usr/bin/env python
paul@58 2
paul@58 3
def f(a, b, c):
paul@58 4
    pass
paul@58 5
paul@58 6
g = f
paul@58 7
g(1, b=3, b=2)
paul@58 8
g(c=3, b=2, a=1, b=0) # uncertain target - not detected
paul@58 9
paul@58 10
def g(a, c, b):
paul@58 11
    pass
paul@58 12
paul@58 13
g(1, a=3, b=2)
paul@58 14
paul@58 15
f(1, 2, 3)
paul@58 16
f(1, b=2, c=3)
paul@58 17
f(c=3, b=2, a=1, b=0)
paul@58 18
paul@58 19
# vim: tabstop=4 expandtab shiftwidth=4