top | item 37177207

(no title)

mattip | 2 years ago

In what way does PyPy break compatibility?

discuss

order

josefx|2 years ago

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