[Python-Dev] PEP 575 (Unifying function/method classes) update (original) (raw)
Jeroen Demeyer J.Demeyer at UGent.be
Fri Apr 27 08:34:23 EDT 2018
- Previous message (by thread): [Python-Dev] Nickname Binding (PEP 572)
- Next message (by thread): [Python-Dev] PEP 572 contradicts PEP 3099
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello all,
I have updated PEP 575 and its reference implementation. See https://www.python.org/dev/peps/pep-0575/ The main differences with respect to the previous version are:
METH_PASS_FUNCTION now passes the function in addition to self (previously, it was passed instead of self).
objclass was generalized to parent and stores either the defining class or the defining module of a built-in function/method.
Proposed two-phase implementation for better backwards compatibility (at the cost of added complexity).
The first two items on the above list are meant to prepare for PEP 573 but are sufficiently useful by itself to add them to PEP 575.
On this mailing list, there have been concerns about backwards compatibility. This PEP does indeed affect code not using duck typing, but using type checks or things like inspect.isbuiltin(). Note that "affect" != "break". I don't know how bad this presumed breakage is. Personally, I think it will be acceptable, but others may disagree. What I do know for sure is that very little breaks in the Python standard library. If anybody has a clever idea to estimate the breakage, I would love to know.
Jeroen.
- Previous message (by thread): [Python-Dev] Nickname Binding (PEP 572)
- Next message (by thread): [Python-Dev] PEP 572 contradicts PEP 3099
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]