Please consider adding partialclass to functools

179 views
Skip to first unread message

Neil Girdhar

unread,
May 2, 2018, 5:46:10 PM5/2/18
to python-ideas
Essentially, functools.partial is almost good enough for specifying some of the parameters of an object's initializer, but the partial object doesn't respond properly to issubclass.  Please consider adding something like partialclass described here:


I ended up doing the same thing here:


Adding functools.partialclass would be similar to the addition of partialmethod in 3.4.

Best,

Neil

Guido van Rossum

unread,
May 2, 2018, 7:20:51 PM5/2/18
to Neil Girdhar, python-ideas
I think this would be appropriate to file a feature request issue on bugs.python.org, and then submit a PR. (If you don't want to submit the PR, I'm afraid it's better if you don't bother with the issue -- we have enough minor feature requests already, we need to filter by what people are actually willing to put an effort into.)

_______________________________________________
Python-ideas mailing list
Python...@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/




--
--Guido van Rossum (python.org/~guido)

Neil Girdhar

unread,
May 2, 2018, 10:08:33 PM5/2/18
to gu...@python.org, python-ideas
Yes, I'm happy to put a PR together.

Thanks,

Neil

Steven D'Aprano

unread,
May 2, 2018, 10:42:02 PM5/2/18
to python...@python.org
On Wed, May 02, 2018 at 02:46:09PM -0700, Neil Girdhar wrote:
> Essentially, functools.partial is almost good enough for specifying some of
> the parameters of an object's initializer, but the partial object doesn't
> respond properly to issubclass.
[...]

I think that ought to be an uncontroversial enough change that it can be
taken to the bug tracker. I think you should just raise a feature
enhancement request for 3.8 on the tracker, and link to this thread on
the mailing list archives in case some discussion follows.


--
Steve

Neil Girdhar

unread,
May 3, 2018, 2:34:35 PM5/3/18
to python...@googlegroups.com, python...@python.org

--

---
You received this message because you are subscribed to a topic in the Google Groups "python-ideas" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python-ideas/LWGXM1U20vs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python-ideas...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Terry Reedy

unread,
May 3, 2018, 5:44:52 PM5/3/18
to python...@python.org
On 5/3/2018 2:34 PM, Neil Girdhar wrote:
> Done: https://bugs.python.org/issue33419

I agree with Steven.
Add the functools 'experts' as nosy. And add links to the SO items.



> On Wed, May 2, 2018 at 10:42 PM Steven D'Aprano
> <st...@pearwood.info
> <mailto:st...@pearwood.info>> wrote:
>
> On Wed, May 02, 2018 at 02:46:09PM -0700, Neil Girdhar wrote:
> > Essentially, functools.partial is almost good enough for
> specifying some of
> > the parameters of an object's initializer, but the partial object
> doesn't
> > respond properly to issubclass.
> [...]
>
> I think that ought to be an uncontroversial enough change that it
> can be
> taken to the bug tracker. I think you should just raise a feature
> enhancement request for 3.8 on the tracker, and link to this thread on
> the mailing list archives in case some discussion follows.

--
Terry Jan Reedy

Neil Girdhar

unread,
May 3, 2018, 6:01:05 PM5/3/18
to python...@googlegroups.com, python...@python.org
Thank you.  Done.

Reply all
Reply to author
Forward
0 new messages