git.fiddlerwoaroof.com
Browse code

Edited README.markdown via GitHub

fiddlerwoaroof authored on 31/05/2011 17:33:25
Showing 1 changed files
... ...
@@ -30,19 +30,19 @@ A JSON-RPC 2.0 implementation for Python (Python 3 not supported yet)
30 30
     jsonrpc.proxy.JSONRPCException: unsupported operand type(s) for +: 'int' and 'unicode'
31 31
 
32 32
 
33
-     >>> server.batch_call( dict(add=( (1,2), {} ), subtract=( (3,2), {} )) )
34
-     [(3, None), (1, None)] # the pattern is (result, error)
35
-
36
-     # batch calls can also be done with an iterable, if you want
37
-     # to have more than one call to the same method
38
-     >>> server.batch_call( [('add', ((1, 2), {})), ('subtract', ((3, 2), {}))] )
39
-     [(3, None), (1, None)]
40
-
41
-     # Exceptions in batch calls
42
-     >>> server.batch_call( dict(add=( (1,2), {} ), subtract=( (3,'2'), {} )) )
43
-     [(3, None), (None, {u'message': u"unsupported operand type(s) for -: 'int' 
44
-     and 'unicode'", u'code': 0, u'data': [u"unsupported operand type(s) for -: 
45
-     'int' and 'unicode'"]})]
33
+    >>> server.batch_call( dict(add=( (1,2), {} ), subtract=( (3,2), {} )) )
34
+    [(3, None), (1, None)] # the pattern is (result, error)
35
+
36
+    # batch calls can also be done with an iterable, if you want
37
+    # to have more than one call to the same method
38
+    >>> server.batch_call( [('add', ((1, 2), {})), ('subtract', ((3, 2), {}))] )
39
+    [(3, None), (1, None)]
40
+
41
+    # Exceptions in batch calls
42
+    >>> server.batch_call( dict(add=( (1,2), {} ), subtract=( (3,'2'), {} )) )
43
+    [(3, None), (None, {u'message': u"unsupported operand type(s) for -: 'int' 
44
+      and 'unicode'", u'code': 0, u'data': [u"unsupported operand type(s) for -: 
45
+      'int' and 'unicode'"]})]
46 46
 
47 47
 
48 48