[issue33419] Add functools.partialclass

2018-05-10 Thread Nick Coghlan
Nick Coghlan added the comment: Marking as closed/later to indicate that we're not going to pursue this in the near term, but it's not out of the question that we might accept a future proposal along these lines. -- resolution: -> later stage: patch review ->

[issue33419] Add functools.partialclass

2018-05-09 Thread Neil Girdhar
Neil Girdhar added the comment: It seems like Python doesn't do very well with dynamically-generated classes. For that reason, I'm losing interest on this feature. Is there any interest in merging the documentation changes here:

[issue33419] Add functools.partialclass

2018-05-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm -1 on this change. It looks as an uncommon case, and the correct general implementation is hard (it may be even more hard that it looked to me now). The stdlib should't provide an incomplete implementation which can be

[issue33419] Add functools.partialclass

2018-05-05 Thread Nick Coghlan
Nick Coghlan added the comment: Note that Neil did start with a python-ideas discussion, and was directed over here, since the idea seemed simple enough, and worth pursuing. As Serhiy notes though, there are many more subtleties to be addressed here than I first thought.

[issue33419] Add functools.partialclass

2018-05-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I'm not sure that this should be in the stdlib. The three-line function can > be enough for your simple case, and it is too simple for including it in the > stdlib. But for general stdlib quality solution it lacks many

[issue33419] Add functools.partialclass

2018-05-04 Thread Neil Girdhar
Neil Girdhar added the comment: I'm not sure that this should be in the stdlib. The three-line function can be enough for your simple case, and it is too simple for including it in the stdlib. But for general stdlib quality solution it lacks many details. 1. It doesn't

[issue33419] Add functools.partialclass

2018-05-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm not sure that this should be in the stdlib. The three-line function can be enough for your simple case, and it is too simple for including it in the stdlib. But for general stdlib quality solution it lacks many details. 1.

[issue33419] Add functools.partialclass

2018-05-03 Thread Neil Girdhar
Neil Girdhar added the comment: Done: https://github.com/python/cpython/pull/6699 -- ___ Python tracker ___

[issue33419] Add functools.partialclass

2018-05-03 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +6391 stage: -> patch review ___ Python tracker ___

[issue33419] Add functools.partialclass

2018-05-03 Thread Eric V. Smith
Eric V. Smith added the comment: You'll need to use blurb: https://pypi.org/project/blurb/ https://devguide.python.org/committing/#what-s-new-and-news-entries Well, technically it's possible to not use blurb and do it manually, but you'll want to use it. --

[issue33419] Add functools.partialclass

2018-05-03 Thread Neil Girdhar
Neil Girdhar added the comment: I figured it would have to be 3.8, but it looks like Doc/whatsnew/3.8.rst has not been created? Do I create that? -- ___ Python tracker

[issue33419] Add functools.partialclass

2018-05-03 Thread Neil Girdhar
Change by Neil Girdhar : Added file: https://bugs.python.org/file47569/partialclass3.diff ___ Python tracker ___

[issue33419] Add functools.partialclass

2018-05-03 Thread Eric V. Smith
Eric V. Smith added the comment: This has to be a 3.8 feature. It would be best if you could convert this to a github pull request, and use blurb to generate the news entry. But those aren't strictly necessary, someone else can do the mechanics of that. I'm willing to do

[issue33419] Add functools.partialclass

2018-05-03 Thread Neil Girdhar
Neil Girdhar added the comment: Added functools experts. Links to relevant stackoverflow questions: https://stackoverflow.com/questions/38911146/python-equivalent-of-functools-partial-for-a-class-constructor

[issue33419] Add functools.partialclass

2018-05-03 Thread Neil Girdhar
Neil Girdhar added the comment: I edited some of the documentation as well to use the technical terms "partial function application", "partial method application", and "partial class application". This emphasizes the parallel structure and reduces confusion with

[issue33419] Add functools.partialclass

2018-05-03 Thread Neil Girdhar
Change by Neil Girdhar : Added file: https://bugs.python.org/file47568/partialclass2.diff ___ Python tracker ___

[issue33419] Add functools.partialclass

2018-05-03 Thread Neil Girdhar
Change by Neil Girdhar : -- components: +Library (Lib) type: -> enhancement ___ Python tracker ___

[issue33419] Add functools.partialclass

2018-05-03 Thread Neil Girdhar
New submission from Neil Girdhar : 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. Adding functools.partialclass is similar to the addition of