[pypy-dev] Adding support for __eq__ to RPython
Armin Rigo
arigo at tunes.org
Wed Jul 30 08:43:11 CEST 2014
Hi Tyler,
On 29 July 2014 17:45, Tyler Wade <wayedt at gmail.com> wrote:
> While working on my GSoC project to move PyPy’s unicode implementation to utf-8, I added support for __eq__ to RPython. It was suggested on IRC that this may be controversial and I should write to the mailing list for further feedback. I’ve pushed my changes to the rpython-__eq__ branch if you’d like to look at the code itself.
How much rewrites would be involved if you did instead:
@specialize.argtype(0,1)
def eq(x, y):
if isinstance(x, Utf8Str):
return x.eq(y)
return x == y
and used the global function eq() instead of the == operator where relevant?
A bientôt,
Armin.
More information about the pypy-dev
mailing list