blob: 40db5e8d0abe42b7af5e62235bf5490c557f3c9a (
plain)
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
|
# vim:fileencoding=utf-8:noet
def nop(_):
pass
class Foo(object):
def __init__(self):
nop('__init__')
self.bar()
self.baz()
self.bra()
@classmethod
def bar(cls):
nop(cls.__name__)
@staticmethod
def baz():
nop(1)
def bra(self):
nop(self.__class__.__name__)
def brah():
nop('brah')
f = Foo()
Foo.bar()
Foo.baz()
Foo.bra(f)
f.bar()
f.baz()
f.bra()
brah()
|