67 lines
1.3 KiB
Python
Executable File
67 lines
1.3 KiB
Python
Executable File
class TestClass:
|
|
def __init__(self):
|
|
self.data = 10
|
|
|
|
def f1(self, p1 = 3, p2 = 4.0, p3 = False):
|
|
pass
|
|
|
|
def f2(self, p1 = "asd", *argv, **kw):
|
|
pass
|
|
|
|
def f3(self, p1 = [1,2,3], **kw):
|
|
pass
|
|
|
|
def f4(self, p1 = {"v1":2.3}, *argv):
|
|
pass
|
|
|
|
obj = TestClass()
|
|
print obj.data
|
|
|
|
|
|
|
|
class TestClassDev (DeviceBase):
|
|
def __init__(self):
|
|
self.data = 10
|
|
|
|
def doInitialize(self):
|
|
pass
|
|
|
|
def update(self):
|
|
pass
|
|
|
|
def f1(self, p1 = 3, p2 = 4.0, p3 = False):
|
|
pass
|
|
|
|
def f2(self, p1 = "asd", *argv, **kw):
|
|
pass
|
|
|
|
def f3(self, p1 = [1,2,3], **kw):
|
|
pass
|
|
|
|
def f4(self, p1 = {"v1":2.3}, *argv):
|
|
pass
|
|
|
|
o2 = TestClassDev()
|
|
|
|
|
|
|
|
class TestClassRead (Readable):
|
|
def __init__(self):
|
|
self.data = 10
|
|
|
|
def f1(self, p1 = 3, p2 = 4.0, p3 = False):
|
|
pass
|
|
|
|
def f2(self, p1 = "asd", *argv, **kw):
|
|
pass
|
|
|
|
def f3(self, p1 = [1,2,3], **kw):
|
|
pass
|
|
|
|
def f4(self, p1 = {"v1":2.3}, *argv):
|
|
pass
|
|
|
|
def read(self):
|
|
return 1
|
|
|
|
o3 = TestClassRead() |