blob: 7884cbde741cb6903c5348d37370c04b01dd09b6 (
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
|
# pylint: disable=R0903, print-statement
"""test staticmethod and classmethod as decorator"""
__revision__ = None
class StaticMethod1(object):
"""staticmethod test"""
def __init__(self):
pass
@staticmethod
def do_work():
"Working..."
@staticmethod
def do_work_with_arg(job):
"Working on something"
print "Working on %s..." % job
class ClassMethod2(object):
"""classmethod test"""
def __init__(self):
pass
@classmethod
def do_work(cls):
"Working..."
@classmethod
def do_work_with_arg(cls, job):
"Working on something"
print "Working on %s..." % job
|