Message291024
By “factory instance”, I presume you just mean a function (or class or method) that returns an appropriate object when called. (I think these are normally called “factory functions”. Instances are objects, the things that class constructors and factories return.)
What is being proposed? The best idea that I understand is hinted in <https://bugs.python.org/issue29947#msg290976>. That is, to document and allow any function (not just a class or factory) to be passed as (or instead of) the RequestHandlerClass parameter.
This is a significant change to the documentation and API, but I would support it, and I think it should already be supported by the implementation.
The question of renaming the RequestHandlerClass parameter is a harder decision IMO. I think it would be easier to make the documentation clear that it is a misnomer and does not have to be a class. But in the long term, renaming the parameter seems nicer.
If it was “renamed”, we would first have to add a competing parameter, keep the old parameter around, consider adding deprecation warnings in 2020 when Python 2 is dead, document both parameters, decide if anything should happen when both parameters are passed, etc. Much trickier, but possible. This renaming process is similar to “base64.encodestring” vs “encodebytes”, but more involved. I can’t think of an example where a function or constructor parameter was renamed like this. |
|
Date |
User |
Action |
Args |
2017-04-02 05:44:07 | martin.panter | set | recipients:
+ martin.panter, eric.smith, r.david.murray, docs@python, dominic108 |
2017-04-02 05:44:07 | martin.panter | set | messageid: <1491111847.33.0.913700721302.issue29947@psf.upfronthosting.co.za> |
2017-04-02 05:44:07 | martin.panter | link | issue29947 messages |
2017-04-02 05:44:06 | martin.panter | create | |
|