Hi,
I've noticed some strange behaviour with tornadorpc, not sure if I'm doing something wrong though.
server code:
from tornadorpc.json import JSONRPCHandler
from tornadorpc import start_server
class Handler(JSONRPCHandler):
def test(self, a=1, b=2, c=3, d=4):
return {'a': a, 'b': b, 'c': c, 'd': d}
start_server(Handler, port=8888)
client code:
import jsonrpclib
print server.test()
print server.test(a='one')
print server.test(d='four')
print server.test(a='one',b='two',c='three',d='four')
This prints (unicode markers removed for readability):
{'a': 4, 'c': 2, 'b': 3, 'd': 1}
{'a': 'one', 'c': 2, 'b': 3, 'd': 1}
{'a': 4, 'c': 2, 'b': 3, 'd': 'four'}
{'a': 'one', 'c': 'three', 'b': 'two', 'd': 'four'}
so it seems that the order of unset kwargs gets reversed somehow!
any clue what's going on here?
Thanks,
Sander