06.10.13 00:06, Victor Stinner написав(ла): > The str type is immutable, bytearray is not. It's easier to justify > optimisations on mutable types, like overallocate lists for example. We can resize str or bytes if its refcount is 1. And resize is cheap in some circumstances. This optimization is CPython-only.