> On Apr 12, 2018, at 9:12 AM, Jeroen Demeyer <j.deme...@ugent.be> wrote:
> 
> I would like to request a review of PEP 575, which is about changing the 
> classes used for built-in functions and Python functions and methods. The 
> text of the PEP can be found at
> 
> https://www.python.org/dev/peps/pep-0575/

Thanks for doing this work.  The PEP is well written and I'm +1 on the general 
idea of what it's trying to do (I'm still taking in all the details).

It would be nice to have a section that specifically discusses the implications 
with respect to other existing function-like tooling:  classmethod, 
staticmethod, partial, itemgetter, attrgetter, methodgetter, etc.

Also, please mention the backward compatibility issue that will arise for code 
that currently relies on types.MethodType, types.BuiltinFunctionType, 
types.BuiltinMethodType, etc.  For example, I would need to update the code in 
random._randbelow().  That code uses the existing builtin-vs-pure-python type 
distinctions to determine whether either the random() or getrandbits() methods 
have been overridden.   This is likely an easy change for me to make, but there 
may be code like it the wild, code that would be broken if the distinction is 
lost.


Raymond







_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to