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):
88 return ("%s" % msg) 89
90 addr = msgpackrpc.Address(mylocaladdr, port)
91 server = msgpackrpc.Server(EchoHandler())
Extra parentheses in code can be removed for improved readability.
In the examples below, the first example is more readable than the second one.
Preferred:
if len(some_variable) + 1 < 1:
...
Not preferred:
if (len(some_variable) + 1) < 1:
...