Guido van Rossum <gu...@python.org> added the comment:
The PEP does not specify collections.Generator at all, so this is not just a matter of interpreting the PEP. The presence of a __del__ method can cause subtle behavior changes to the GC, so I worry that adding __del__ to that class now is going to break currently-working code. Not having seen the OP's Generator subclass, I wonder if they even meant to subclass collections.Generator? It's pretty esoteric to subclass Generator -- usually it's better to subclass Iterator or Iterable. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38911> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com