diff options
author | Armin Rigo <arigo@tunes.org> | 2013-08-20 14:41:08 +0200 |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2013-08-20 14:41:08 +0200 |
commit | 6a2807c32c884cdd82357552db203283c1a9f028 (patch) | |
tree | b363efd5b4cff960bd1e56e6e2ca2947a73cb42b /pypy/objspace/descroperation.py | |
parent | Example of a simple case for import_from_mixin(). (diff) | |
download | pypy-6a2807c32c884cdd82357552db203283c1a9f028.tar.gz pypy-6a2807c32c884cdd82357552db203283c1a9f028.tar.bz2 pypy-6a2807c32c884cdd82357552db203283c1a9f028.zip |
Change the _mixin_ class DescrOperation into an import_from_mixin() class.
There are a couple of subtle possible differences (so I'll run all tests now)
Diffstat (limited to 'pypy/objspace/descroperation.py')
-rw-r--r-- | pypy/objspace/descroperation.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pypy/objspace/descroperation.py b/pypy/objspace/descroperation.py index b389bae8bd..812e518691 100644 --- a/pypy/objspace/descroperation.py +++ b/pypy/objspace/descroperation.py @@ -121,7 +121,7 @@ contains_jitdriver = jit.JitDriver(name='contains', greens=['w_type'], reds='auto') class DescrOperation(object): - _mixin_ = True + # This is meant to be a *mixin*. def is_data_descr(space, w_obj): return space.lookup(w_obj, '__set__') is not None @@ -867,12 +867,12 @@ for _name, _symbol, _arity, _specialnames in ObjSpace.MethodTable: elif _arity == 2 and len(_specialnames) == 2: #print "binop", _specialnames _impl_maker = _make_binop_impl - elif _arity == 1 and len(_specialnames) == 1: + elif _arity == 1 and len(_specialnames) == 1 and _name != 'int': #print "unaryop", _specialnames _impl_maker = _make_unaryop_impl if _impl_maker: setattr(DescrOperation,_name,_impl_maker(_symbol,_specialnames)) - elif _name not in ['is_', 'id','type','issubtype', + elif _name not in ['is_', 'id','type','issubtype', 'int', # not really to be defined in DescrOperation 'ord', 'unichr', 'unicode']: raise Exception, "missing def for operation %s" % _name |