Re: [Python-ideas] PEP draft: Unifying function/method classes

2018-04-03 Thread Nick Coghlan
On 1 April 2018 at 00:48, Jeroen Demeyer wrote: > I have prepared a PEP draft for unifying function/method classes. You can > find it at > > https://github.com/jdemeyer/PEP-functions > > This has not officially been submitted as PEP yet, I want to hear your > comments first. I've only read the de

Re: [Python-ideas] PEP draft: Unifying function/method classes

2018-04-02 Thread Guido van Rossum
I want to support this work. I can't promise your PEP will be accepted, but it looks like you've done your homework, and you're getting feedback from core devs who care about this area. (One of them may end up BDFL-delegate.) It will be a long road to success, but I recommend that you start with a

Re: [Python-ideas] PEP draft: Unifying function/method classes

2018-04-02 Thread Serhiy Storchaka
31.03.18 17:48, Jeroen Demeyer пише: I have prepared a PEP draft for unifying function/method classes. You can find it at https://github.com/jdemeyer/PEP-functions This has not officially been submitted as PEP yet, I want to hear your comments first. I once tried to move in this direction (

Re: [Python-ideas] PEP draft: Unifying function/method classes

2018-04-02 Thread INADA Naoki
On Tue, Apr 3, 2018 at 12:46 AM, Jeroen Demeyer wrote: > On 2018-04-02 12:39, INADA Naoki wrote: >> >> Thanks for writing such hard PEP. >> >> At first glance, it new type hierarchy seems OK. >> But I can't understand rational for new flags. > > > Which flags in particular do you mean? I just push

Re: [Python-ideas] PEP draft: Unifying function/method classes

2018-04-02 Thread Jeroen Demeyer
On 2018-04-02 12:39, INADA Naoki wrote: Thanks for writing such hard PEP. At first glance, it new type hierarchy seems OK. But I can't understand rational for new flags. Which flags in particular do you mean? I just pushed an update explaining the rationale of METH_ARG0_FUNCTION: https://gi

Re: [Python-ideas] PEP draft: Unifying function/method classes

2018-04-02 Thread INADA Naoki
Thanks for writing such hard PEP. At first glance, it new type hierarchy seems OK. But I can't understand rational for new flags. And it's very difficult to estimate runtime and maintenance cost of the PEP, without draft implementation. FASTCALL is introduced in recently version, and it make imp

Re: [Python-ideas] PEP draft: Unifying function/method classes

2018-04-01 Thread Nick Coghlan
On 1 April 2018 at 02:58, Jeroen Demeyer wrote: > On 2018-03-31 18:09, Steven D'Aprano wrote: >> Seems to me that if you want a fast, exact (no subclasses) check, you >> should use "type(obj) is Class" rather than isinstance. If the *only* >> reason to prohibit subclassing is to make isinstance a

Re: [Python-ideas] PEP draft: Unifying function/method classes

2018-03-31 Thread Steven D'Aprano
On Sat, Mar 31, 2018 at 06:58:19PM +0200, Jeroen Demeyer wrote: > On 2018-03-31 18:09, Steven D'Aprano wrote: > >It seems like a huge amount of work > > What is a huge amount of work? Writing the PEP? Implementing the PEP? > Using the PEP? Adapting existing Python code to the PEP? Any or all of

Re: [Python-ideas] PEP draft: Unifying function/method classes

2018-03-31 Thread Jeroen Demeyer
On 2018-03-31 21:12, Terry Reedy wrote: I would be all for more of the builtins and stdlib being converted. Can't 3rd-party C code use ArgumentClinic? ArgumentClinic stores the signature as text. For default values, only a few specific classes are supported. I want to support arbitrary Python

Re: [Python-ideas] PEP draft: Unifying function/method classes

2018-03-31 Thread Terry Reedy
On 3/31/2018 12:09 PM, Steven D'Aprano wrote: On Sat, Mar 31, 2018 at 04:48:56PM +0200, Jeroen Demeyer wrote: I have prepared a PEP draft for unifying function/method classes. You can find it at https://github.com/jdemeyer/PEP-functions This has not officially been submitted as PEP yet, I want

Re: [Python-ideas] PEP draft: Unifying function/method classes

2018-03-31 Thread Jeroen Demeyer
On 2018-03-31 18:09, Steven D'Aprano wrote: It seems like a huge amount of work What is a huge amount of work? Writing the PEP? Implementing the PEP? Using the PEP? Adapting existing Python code to the PEP? Why isn't the answer to provide a hook to support introspection? That is a lot eas

Re: [Python-ideas] PEP draft: Unifying function/method classes

2018-03-31 Thread Steven D'Aprano
On Sat, Mar 31, 2018 at 04:48:56PM +0200, Jeroen Demeyer wrote: > I have prepared a PEP draft for unifying function/method classes. You > can find it at > > https://github.com/jdemeyer/PEP-functions > > This has not officially been submitted as PEP yet, I want to hear your > comments first. It

[Python-ideas] PEP draft: Unifying function/method classes

2018-03-31 Thread Jeroen Demeyer
I have prepared a PEP draft for unifying function/method classes. You can find it at https://github.com/jdemeyer/PEP-functions This has not officially been submitted as PEP yet, I want to hear your comments first. Thanks, Jeroen. ___ Python-ideas