Message87888
A more general solution would be to pass the RequestHandler instance as
a parameter to the dispatch function. This would allow the function to
pick out more than just the client address. To avoid breaking
pre-existing code, this should be made optional, perhaps by adding a
keyword to the register_function method. Something like this:
def __init__(...):
self._include_request = set()
def register_function(..., include_request=False):
self._include_request.add(method)
Later, the dispatch function would be invoked like this:
kwds = {}
if method in self._include_request:
kwds.update(request=self)
[...]
return self.instance._dispatch(method, params, **kwds)
[...]
return func(client_address, *params, **kwds) |
|
Date |
User |
Action |
Args |
2009-05-16 12:43:13 | samwyse | set | recipients:
+ samwyse, draghuram, cloverprince |
2009-05-16 12:43:12 | samwyse | set | messageid: <1242477792.73.0.712030105232.issue3058@psf.upfronthosting.co.za> |
2009-05-16 12:43:11 | samwyse | link | issue3058 messages |
2009-05-16 12:43:10 | samwyse | create | |
|