-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathtest.py
More file actions
53 lines (39 loc) · 926 Bytes
/
test.py
File metadata and controls
53 lines (39 loc) · 926 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
class BaseClass(object):
cls_attr = 0
def __init__(self):
self.shadowing = 2
class DerivedClass(BaseClass):
cls_attr = 3
shadowing = 5
def __init__(self):
BaseClass.__init__(self)
self.inst_attr = 4
def method(self):
self.cls_attr
self.inst_attr
self.shadowing
#ODASA-3836
def comprehensions_and_generators(seq):
[y*y for y in seq]
(y*y for y in seq)
{y*y for y in seq}
{y:y*y for y in seq}
#ODASA-5391
@decorator(x)
class Decorated(object):
pass
d = Decorated()
import module as thing
from module import foo
foo
thing.bar
from package import x
import package as p
p.x
def foo(dirname, lines):
head, tail = os.path.split(dirname)
x = head # `head` is missing jump-to-def target
for start, line in enumerate(lines):
line = line.strip() # `line` is missing jump-to-def target
break
return x