Author: Alex Gaynor <[email protected]>
Branch: 
Changeset: r64168:46a67ac72e3b
Date: 2013-05-15 07:53 -0700
http://bitbucket.org/pypy/pypy/changeset/46a67ac72e3b/

Log:    some random cleanups

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
@@ -339,8 +339,9 @@
             s += ' instance of %s' % self.w__class__
         return '<%s>' % s
 
-    def unwrap(w_self, space):
-        raise UnwrapError, 'cannot unwrap %r' % (w_self,)
+    def unwrap(self, space):
+        raise UnwrapError('cannot unwrap %r' % self)
+
 
 class UnwrapError(Exception):
     pass
@@ -405,7 +406,7 @@
         mm.dispatch_tree = merge(self.dispatch_tree, other.dispatch_tree)
         return mm
 
-NOT_MULTIMETHODS = dict.fromkeys(
+NOT_MULTIMETHODS = set(
     ['delattr', 'delete', 'get', 'id', 'inplace_div', 'inplace_floordiv',
      'inplace_lshift', 'inplace_mod', 'inplace_pow', 'inplace_rshift',
      'inplace_truediv', 'is_', 'set', 'setattr', 'type', 'userdel',
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to