Hacker News new | ask | show | jobs
by mattip 1036 days ago
In what way does PyPy break compatibility?
1 comments

Many little ways and a few bigger ones.

The biggest one would be not using reference counting, which makes execution of cleanup code in __del__ somewhat non deterministic and tricks that rely on the exact reference count of an object outright impossible (for example reusing "immutable" objects that are only referenced once).

I thought that the C-API still had significant differences but going by its documentation it has a compatibility layer that is almost complete if somewhat slow.

A full list with all the minor differences is here: https://doc.pypy.org/en/latest/cpython_differences.html