object
PYL-R0205 81 f.write(serialized)
82
83def doRpcServer(port, stopTimeSec):
84 class EchoHandler(object): 85 def Echo123(self, msg1, msg2, msg3):
86 return ("1:%s 2:%s 3:%s" % (msg1.decode("utf-8"), msg2.decode("utf-8"), msg3.decode("utf-8")))
87 def EchoStruct(self, msg):
The class is inheriting from object
, which is implicit under Python 3 , hence can be safely removed from bases.
Not preferred:
class Foo(object):
"""Foo bar baz"""
Preferred:
class Foo:
"""Foo bar baz"""