Martin Panter added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29947>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to