Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r44706:f7d6c1b93269 Date: 2011-06-05 10:51 +0200 http://bitbucket.org/pypy/pypy/changeset/f7d6c1b93269/
Log: Document that old-style classes can have a __del__ on the instance, but it may not be called on pypy. diff --git a/pypy/doc/cpython_differences.rst b/pypy/doc/cpython_differences.rst --- a/pypy/doc/cpython_differences.rst +++ b/pypy/doc/cpython_differences.rst @@ -173,6 +173,11 @@ >>>> A.__del__ = lambda self: None __main__:1: RuntimeWarning: a __del__ method added to an existing type will not be called +Even more obscure: the same is true, for old-style classes, if you attach +the ``__del__`` to an instance (even in CPython this does not work with +new-style classes). You get a RuntimeWarning in PyPy. To fix these cases +just make sure there is a ``__del__`` method in the class to start with. + Subclasses of built-in types ---------------------------- _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit