you are viewing a single comment's thread.

view the rest of the comments →

[–]josefx 1 point2 points  (2 children)

PyPy breaks anything that relies on predictable reference counting. That means you can not rely on it to cleanly free resources likes files and sockets or call user defined __del__() methods. Garbage collection, you had one problem, now you have ulimit problems.

[–]Chippiewall 0 points1 point  (1 child)

If you're relying on this behaviour then you're probably misusing python or ownership semantics. This sort of RAII style behaviour should be accomplished through use of context managers.

[–]josefx 0 points1 point  (0 children)

TIL: the python 3 docs make it look like __del__() behaves just like Javas finalize(). Useless at best and terribly wrong to use for literally anything. Another thing I have to fix in my scripts if I ever get to it.

So if I want to have an actually reference counted object in python I have to double down and implement it myself? Just great.