[Python-3000] PEP 3124 - Overloading, Generic Functions, Interfaces, etc.
steven.bethard at gmail.com
Thu May 10 04:43:07 CEST 2007
On 5/9/07, Phillip J. Eby <pje at telecommunity.com> wrote:
> At 02:41 PM 5/9/2007 -0600, Steven Bethard wrote:
> >On 4/30/07, Phillip J. Eby <pje at telecommunity.com> wrote:
> >>Proceeding to the "Next" Method
> >>"Before" and "After" Methods
> >>"Around" Methods
> >>Custom Combinations
> >I'd rather see all this left as a third-party library to start with.
> >(Yes, even including __proceed__.)
> That'd be rather like adding new-style classes but not super().
Ok, then leave __proceed__ in. I'm not really particular about the
details -- I'm just hoping you can cut things down to the absolute
minimum you need, and provide the rest in a third party module. As it
is, I think there's too much in the PEP for it to be comprehensible.
And @before, @after, etc. seemed like good candidates for being
> Meanwhile, for the rest of the features, most of the implementation
> would still have to be in the core module.
That's fine. I'm not worried about the implementation. I trust you can
handle that. ;-) I'm worried about trying to pack too much stuff into
> Meanwhile, leaving in the ability to have method combination later,
> but removing the actual implementation of the @before/around/after
> decorators in place would delete a total of less than 40 non-blank
> lines of code.
Sure, but it would also delete huge chunks of explanation about
something which really isn't the core of the PEP. Python got
decorators without the 6 lines of functools.update_wrapper -- I see
this as being roughly the same. In particular,
functools.update_wrapper was never mentioned in PEP 318.
> >As others have mentioned, the current PEP is overwhelming. I'd rather
> >see Py3K start with just the basics. When people are comfortable with
> >the core, we can look into introducing the extras.
> Naturally, I don't consider any of these items "extras", or I
> wouldn't have included them.
I understand that. I'm just hoping you can find a way to cut the PEP
down enough so that folks have a chance of wrapping their head around
it. ;-) I really do think something along these lines
(overloading/generic functions) is right for Python. I just think the
current PEP is too overwhelming for people to see that.
I'm not *in*-sane. Indeed, I am so far *out* of sane that you appear a
tiny blip on the distant coast of sanity.
--- Bucky Katt, Get Fuzzy
More information about the Python-3000