Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
deque and bytearray make an in-memory copy of self if extended with self. deque creates a temporary list, bytearray creates a temporary bytearray. list just iterates itself as a linear array of known size and avoids infinite loop. It could be possible to avoid creaing a temporary copy in case of deque and bytearray too, but I don't think this special case is worth an additional code. But a MutableSequence can represents a sequence that doesn't fit in memory. It can provide an interface to a linear on-disk store. In this case creating an on-memory copy is not possible. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34427> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com