This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author samwyse
Recipients cloverprince, draghuram, samwyse
Date 2009-05-16.12:43:10
SpamBayes Score 2.3496958e-07
Marked as misclassified No
Message-id <1242477792.73.0.712030105232.issue3058@psf.upfronthosting.co.za>
In-reply-to
Content
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)
History
Date User Action Args
2009-05-16 12:43:13samwysesetrecipients: + samwyse, draghuram, cloverprince
2009-05-16 12:43:12samwysesetmessageid: <1242477792.73.0.712030105232.issue3058@psf.upfronthosting.co.za>
2009-05-16 12:43:11samwyselinkissue3058 messages
2009-05-16 12:43:10samwysecreate