Author: Maciej Fijalkowski <[email protected]>
Branch: kill-unary-multimethods
Changeset: r47570:b03531b7afaf
Date: 2011-09-23 20:19 +0200
http://bitbucket.org/pypy/pypy/changeset/b03531b7afaf/
Log: oops, put stuff back in the table, it has implications
diff --git a/pypy/interpreter/baseobjspace.py b/pypy/interpreter/baseobjspace.py
--- a/pypy/interpreter/baseobjspace.py
+++ b/pypy/interpreter/baseobjspace.py
@@ -1416,6 +1416,8 @@
('is_', 'is', 2, []),
('id', 'id', 1, []),
('type', 'type', 1, []),
+ ('isinstance', 'isinstance', 2, ['__instancecheck__']),
+ ('issubtype', 'issubtype', 2, ['__subclasscheck__']), # not for
old-style classes
('repr', 'repr', 1, ['__repr__']),
('str', 'str', 1, ['__str__']),
('format', 'format', 2, ['__format__']),
diff --git a/pypy/objspace/std/builtinshortcut.py
b/pypy/objspace/std/builtinshortcut.py
--- a/pypy/objspace/std/builtinshortcut.py
+++ b/pypy/objspace/std/builtinshortcut.py
@@ -39,6 +39,7 @@
'abs', 'hex', 'oct', # rare stuff?
'pos', 'divmod', 'cmp', # rare stuff?
'float', 'long', 'coerce', # rare stuff?
+ 'isinstance', 'issubtype',
]
# We cannot support {get,set,del}slice right now because
# DescrOperation.{get,set,del}slice do a bit more work than just call
diff --git a/pypy/objspace/std/model.py b/pypy/objspace/std/model.py
--- a/pypy/objspace/std/model.py
+++ b/pypy/objspace/std/model.py
@@ -445,7 +445,8 @@
NOT_MULTIMETHODS = dict.fromkeys(
['delattr', 'delete', 'get', 'id', 'inplace_div', 'inplace_floordiv',
'inplace_lshift', 'inplace_mod', 'inplace_pow', 'inplace_rshift',
- 'inplace_truediv', 'is_', 'set', 'setattr', 'type', 'userdel'])
+ 'inplace_truediv', 'is_', 'set', 'setattr', 'type', 'userdel',
+ 'isinstance', 'issubtype'])
# XXX should we just remove those from the method table or we're happy
# with just not having multimethods?
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit