Marco Buttu added the comment: Sorry, in the last example, for the code object ``x`` is not free both in ``foo()`` and ``moo()``, but this does not affect the conclusion. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue28853> _______________________________________