| 1 |
""" |
| 2 |
Named Params: |
| 3 |
>>> def a(abc): pass |
| 4 |
... |
| 5 |
>>> a(abc=3) # <- this stuff (abc) |
| 6 |
""" |
| 7 |
|
| 8 |
def a(abc): |
| 9 |
pass |
| 10 |
|
| 11 |
|
| 12 |
a(abc) |
| 13 |
|
| 14 |
|
| 15 |
def a(*some_args, **some_kwargs): |
| 16 |
pass |
| 17 |
|
| 18 |
|
| 19 |
a(some_args) |
| 20 |
|
| 21 |
|
| 22 |
a(some_kwargs) |
| 23 |
|
| 24 |
def multiple(foo, bar): |
| 25 |
pass |
| 26 |
|
| 27 |
|
| 28 |
multiple(foo, bar) |
| 29 |
|
| 30 |
|
| 31 |
multiple(foo, bar |
| 32 |
|
| 33 |
my_lambda = lambda lambda_param: lambda_param + 1 |
| 34 |
|
| 35 |
my_lambda(lambda_param) |
| 36 |
|
| 37 |
|
| 38 |
class Test(object): |
| 39 |
def __init__(self, hello_other): |
| 40 |
pass |
| 41 |
|
| 42 |
def __call__(self, hello): |
| 43 |
pass |
| 44 |
|
| 45 |
def test(self, blub): |
| 46 |
pass |
| 47 |
|
| 48 |
|
| 49 |
Test(hello=) |
| 50 |
|
| 51 |
Test()(hello=) |
| 52 |
|
| 53 |
Test()(self=) |
| 54 |
|
| 55 |
Test().test(self=) |
| 56 |
|
| 57 |
Test().test(blub=) |
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
any(iterable=) |
| 63 |
|
| 64 |
|
| 65 |
def foo(xyz): |
| 66 |
pass |
| 67 |
|
| 68 |
|
| 69 |
@foo(xy) |
| 70 |
def x(): pass |
| 71 |
|
| 72 |
|
| 73 |
foo(xyz) |
| 74 |
|
| 75 |
|
| 76 |
x = " "; foo(x.xyz) |
| 77 |
|
| 78 |
x = " "; foo([xyz) |
| 79 |
|
| 80 |
x = " "; foo(z[f,xyz) |
| 81 |
|
| 82 |
x = " "; foo(z[xyz) |
| 83 |
|
| 84 |
x = " "; foo(xyz[xyz) |
| 85 |
|
| 86 |
x = " "; foo(xyz[(xyz) |
| 87 |
|
| 88 |
|
| 89 |
@foo(xyz) |
| 90 |
def x(): pass |
| 91 |
|
| 92 |
@str |
| 93 |
|
| 94 |
@foo(xyz) |
| 95 |
def x(): pass |
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
def x(bam, *, bar, baz): |
| 102 |
pass |
| 103 |
def y(bam, *bal, bar, baz, **bag): |
| 104 |
pass |
| 105 |
def z(bam, bar=2, *, bas=1): |
| 106 |
pass |
| 107 |
|
| 108 |
|
| 109 |
x(1, ba) |
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
x(1, bar=2, ba) |
| 115 |
|
| 116 |
x(1, ba, baz=3) |
| 117 |
|
| 118 |
x(1, bar=2, baz=3) |
| 119 |
|
| 120 |
x(basee) |
| 121 |
|
| 122 |
x(1, 2, 3, 4, 5, 6, bar=2) |
| 123 |
|
| 124 |
|
| 125 |
y(1, bar=2, ba) |
| 126 |
|
| 127 |
y(1, ba, baz=3) |
| 128 |
|
| 129 |
y(1, bar=2, baz=3) |
| 130 |
|
| 131 |
y(basee) |
| 132 |
|
| 133 |
y(1, 2, 3, 4, 5, 6, bar=2) |
| 134 |
|
| 135 |
|
| 136 |
z(bam=1, bar=2, bas=3) |
| 137 |
|
| 138 |
z(1, bas=2) |
| 139 |
|
| 140 |
z(1, bas=bas) |
| 141 |
|
| 142 |
|
| 143 |
z(1, bas=bas, **dic) |
| 144 |
|
| 145 |
z(1, bas=bas, *dic) |