997 E741: O = 123 |
997 E741: O = 123 |
998 E741: I = 42 |
998 E741: I = 42 |
999 </p> |
999 </p> |
1000 <p> |
1000 <p> |
1001 Variables can be bound in several other contexts, including class |
1001 Variables can be bound in several other contexts, including class |
1002 and function definitions, 'global' and 'nonlocal' statements, |
1002 and function definitions, lambda functions, 'global' and 'nonlocal' |
1003 exception handlers, and 'with' and 'for' statements. |
1003 statements, exception handlers, and 'with' and 'for' statements. |
1004 In addition, we have a special handling for function parameters. |
1004 In addition, we have a special handling for function parameters. |
1005 </p> |
1005 </p> |
1006 <p> |
1006 <p> |
1007 Okay: except AttributeError as o: |
1007 Okay: except AttributeError as o: |
1008 Okay: with lock as L: |
1008 Okay: with lock as L: |
1009 Okay: foo(l=12) |
1009 Okay: foo(l=12) |
|
1010 Okay: foo(l=I) |
1010 Okay: for a in foo(l=12): |
1011 Okay: for a in foo(l=12): |
|
1012 Okay: lambda arg: arg * l |
|
1013 Okay: lambda a=l[I:5]: None |
|
1014 Okay: lambda x=a.I: None |
|
1015 Okay: if l >= 12: |
1011 E741: except AttributeError as O: |
1016 E741: except AttributeError as O: |
1012 E741: with lock as l: |
1017 E741: with lock as l: |
1013 E741: global I |
1018 E741: global I |
1014 E741: nonlocal l |
1019 E741: nonlocal l |
1015 E741: def foo(l): |
1020 E741: def foo(l): |
1016 E741: def foo(l=12): |
1021 E741: def foo(l=12): |
1017 E741: l = foo(l=12) |
1022 E741: l = foo(l=12) |
1018 E741: for l in range(10): |
1023 E741: for l in range(10): |
|
1024 E741: [l for l in lines if l] |
|
1025 E741: lambda l: None |
|
1026 E741: lambda a=x[1:5], l: None |
|
1027 E741: lambda **l: |
|
1028 E741: def f(**l): |
1019 E742: class I(object): |
1029 E742: class I(object): |
1020 E743: def l(x): |
1030 E743: def l(x): |
1021 </p> |
1031 </p> |
1022 <div align="right"><a href="#top">Up</a></div> |
1032 <div align="right"><a href="#top">Up</a></div> |
1023 <hr /> |
1033 <hr /> |