| 1 |
|
| 2 |
|
| 3 |
definition = 3 |
| 4 |
|
| 5 |
a = definition |
| 6 |
|
| 7 |
|
| 8 |
b |
| 9 |
|
| 10 |
a |
| 11 |
|
| 12 |
b = a |
| 13 |
c = b |
| 14 |
|
| 15 |
c |
| 16 |
|
| 17 |
cd = 1 |
| 18 |
|
| 19 |
cd = c |
| 20 |
|
| 21 |
cd = e |
| 22 |
|
| 23 |
|
| 24 |
import math |
| 25 |
|
| 26 |
math |
| 27 |
|
| 28 |
|
| 29 |
b = math |
| 30 |
|
| 31 |
b |
| 32 |
|
| 33 |
|
| 34 |
foo = 10;print(foo) |
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
class C(object): |
| 40 |
x = 3 |
| 41 |
def b(self): |
| 42 |
|
| 43 |
b |
| 44 |
|
| 45 |
self.b |
| 46 |
|
| 47 |
self.b() |
| 48 |
|
| 49 |
self.b. |
| 50 |
|
| 51 |
self.b |
| 52 |
|
| 53 |
self.x |
| 54 |
|
| 55 |
self.x. |
| 56 |
return 1 |
| 57 |
|
| 58 |
|
| 59 |
b |
| 60 |
|
| 61 |
|
| 62 |
b |
| 63 |
|
| 64 |
|
| 65 |
C.b |
| 66 |
|
| 67 |
C().b |
| 68 |
|
| 69 |
C().b |
| 70 |
|
| 71 |
C().b |
| 72 |
|
| 73 |
D = C |
| 74 |
|
| 75 |
D.b |
| 76 |
|
| 77 |
D().b |
| 78 |
|
| 79 |
|
| 80 |
D().b |
| 81 |
|
| 82 |
D().b |
| 83 |
|
| 84 |
def c(): |
| 85 |
return '' |
| 86 |
|
| 87 |
|
| 88 |
c |
| 89 |
|
| 90 |
c() |
| 91 |
|
| 92 |
|
| 93 |
class ClassVar(): |
| 94 |
x = 3 |
| 95 |
|
| 96 |
|
| 97 |
ClassVar.x |
| 98 |
|
| 99 |
ClassVar().x |
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
ClassVar.x = '' |
| 104 |
|
| 105 |
ClassVar().x = '' |
| 106 |
|
| 107 |
|
| 108 |
def f(t=None): |
| 109 |
|
| 110 |
t = t or 1 |
| 111 |
|
| 112 |
|
| 113 |
class X(): |
| 114 |
pass |
| 115 |
|
| 116 |
|
| 117 |
X(foo=x) |
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
class Foo: |
| 122 |
def foo(self): |
| 123 |
print("foo") |
| 124 |
class Bar: |
| 125 |
def bar(self): |
| 126 |
print("bar") |
| 127 |
class Baz(Foo, Bar): |
| 128 |
def baz(self): |
| 129 |
|
| 130 |
super().foo |
| 131 |
|
| 132 |
super().bar |
| 133 |
|
| 134 |
super() |
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
import import_tree |
| 142 |
|
| 143 |
import_tree.a |
| 144 |
|
| 145 |
|
| 146 |
import import_tree.mod1 |
| 147 |
|
| 148 |
from import_tree.mod1 |
| 149 |
|
| 150 |
import_tree.mod1.a |
| 151 |
|
| 152 |
|
| 153 |
import import_tree.pkg |
| 154 |
|
| 155 |
import_tree.pkg.a |
| 156 |
|
| 157 |
|
| 158 |
import import_tree.pkg.mod1 |
| 159 |
|
| 160 |
import_tree.pkg.mod1.a |
| 161 |
|
| 162 |
import_tree.a |
| 163 |
|
| 164 |
|
| 165 |
from import_tree.pkg import mod1 |
| 166 |
|
| 167 |
mod1.a |
| 168 |
|
| 169 |
|
| 170 |
from import_tree import mod1 |
| 171 |
|
| 172 |
mod1.a |
| 173 |
|
| 174 |
|
| 175 |
from import_tree.pkg.mod1 import a |
| 176 |
|
| 177 |
|
| 178 |
from .imports import os |
| 179 |
|
| 180 |
|
| 181 |
from . import some_variable |
| 182 |
|
| 183 |
|
| 184 |
|
| 185 |
|
| 186 |
def func(): |
| 187 |
class A(): |
| 188 |
def b(self): |
| 189 |
return 1 |
| 190 |
return A() |
| 191 |
|
| 192 |
|
| 193 |
func().b() |
| 194 |
|
| 195 |
|
| 196 |
|
| 197 |
|
| 198 |
|
| 199 |
|
| 200 |
class ClassDef(): |
| 201 |
""" abc """ |
| 202 |
pass |
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
|
| 207 |
|
| 208 |
param = ClassDef |
| 209 |
|
| 210 |
def ab1(param): pass |
| 211 |
|
| 212 |
def ab2(param): pass |
| 213 |
|
| 214 |
def ab3(a=param): pass |
| 215 |
|
| 216 |
ab1(ClassDef);ab2(ClassDef);ab3(ClassDef) |
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
|
| 221 |
|
| 222 |
for i in range(1): |
| 223 |
|
| 224 |
i |
| 225 |
|
| 226 |
for key, value in [(1,2)]: |
| 227 |
|
| 228 |
key |
| 229 |
|
| 230 |
|
| 231 |
for y in [1]: |
| 232 |
|
| 233 |
y |
| 234 |
|
| 235 |
|
| 236 |
|
| 237 |
|
| 238 |
def dec(dec_param=3): |
| 239 |
pass |
| 240 |
|
| 241 |
|
| 242 |
@dec(dec_param=5) |
| 243 |
def y(): |
| 244 |
pass |
| 245 |
|
| 246 |
class ClassDec(): |
| 247 |
def class_func(func): |
| 248 |
return func |
| 249 |
|
| 250 |
|
| 251 |
@ClassDec.class_func |
| 252 |
def x(): |
| 253 |
pass |
| 254 |
|
| 255 |
|
| 256 |
@ClassDec.class_func |
| 257 |
def z(): |
| 258 |
pass |