[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

Berker Peksag report at bugs.python.org
Wed Jun 1 00:00:49 EDT 2016


Berker Peksag added the comment:

Here's some quick review comments:

* xmlrpc_register_decorator_py33.patch doesn't apply cleanly anymore.

* -        serv.register_function(my_function)
  +        serv.register_function(_my_function, name='my_function')

  We should keep ``serv.register_function(my_function)`` as is and add a separate line that uses the new 'name' parameter.

* We can now change set([...]) to {...] in test_introspection1

* +            add_result, pow_result, div_result, \
  +                    myfunc_result, myfunc2_result = multicall()

  No need to use the \ character.

* The docstring of Lib/xmlrpc/server.py is already too long. It's better not to update it.

* Please use the existing code style (name = None -> name=None)

* We can make register_function act both as a decorator and as a decorator factory without changing its signature.

* We need to add a test to cover TypeError case.

* Documentation is missing. See Doc/library/xmlrpc.server.rst.

* Please add a note to Doc/whatsnew/3.6.rst.

----------
nosy: +berker.peksag
stage: patch review -> needs patch
versions: +Python 3.6 -Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7769>
_______________________________________


More information about the Python-bugs-list mailing list