Michael Seifert added the comment: Just an update what doesn't work: just overriding the `__copy__` method.
I tried it but it somewhat breaks `itertools.tee` because if the passed iterable has a `__copy__` method `tee` rather copies the iterator (=> resulting in a lot of unnecessary memory overhead or breakage if a generator is "inside") instead of using it's memory-efficient internals. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29897> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com