Author: Armin Rigo <[email protected]>
Branch:
Changeset: r94764:8973688d3d1c
Date: 2018-06-14 12:19 +0200
http://bitbucket.org/pypy/pypy/changeset/8973688d3d1c/
Log: Rename the MethodType to "instancemethod", like CPython
diff --git a/pypy/interpreter/test/test_function.py
b/pypy/interpreter/test/test_function.py
--- a/pypy/interpreter/test/test_function.py
+++ b/pypy/interpreter/test/test_function.py
@@ -455,6 +455,8 @@
assert repr(B().f).startswith("<bound method B.f of <")
assert repr(A().f).endswith(">>")
+ assert repr(type(A.f)) == repr(type(A().f)) == "<type
'instancemethod'>"
+
def test_method_call(self):
class C(object):
diff --git a/pypy/interpreter/typedef.py b/pypy/interpreter/typedef.py
--- a/pypy/interpreter/typedef.py
+++ b/pypy/interpreter/typedef.py
@@ -688,7 +688,7 @@
Function.typedef.acceptable_as_base_class = False
Method.typedef = TypeDef(
- "method",
+ "instancemethod",
__doc__ = """instancemethod(function, instance, class)
Create an instance method object.""",
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit