[New-bugs-announce] [issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

Johannes Schönberger report at bugs.python.org
Sun Jan 24 13:48:46 CET 2010


New submission from Johannes Schönberger <jls at icoost.com>:

I would suggest to make SimpleXMLRPCServer.SimpleXMLRPCServer.register_function a decorator function.
See the attached file for the solution I wrote (l.209-240), which also works with the current syntax:
@server.register_function
@server.register_function('name')
@server.register_function(name='name')
or:
server.register_function(func)
server.register_function(func, name='name')
server.register_function(function=func, name='name')

So as far as I've tested it (py2.6), it is fully backwards compatible and supports decorators in addition.

----------
components: Extension Modules
files: SimpleXMLRPCServer.py
messages: 98219
nosy: ahojnnes
severity: normal
status: open
title: SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator
type: feature request
versions: Python 2.6
Added file: http://bugs.python.org/file15986/SimpleXMLRPCServer.py

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


More information about the New-bugs-announce mailing list