1. Pypy
  2. Untitled project
  3. pypy

Commits

Maciej Fijalkowski  committed b03531b

oops, put stuff back in the table, it has implications

  • Participants
  • Parent commits f0a7567
  • Branches kill-unary-multimethods

Comments (0)

Files changed (3)

File pypy/interpreter/baseobjspace.py

View file
     ('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__']),

File pypy/objspace/std/builtinshortcut.py

View file
                  '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

File pypy/objspace/std/model.py

View file
 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?