The str type is immutable, bytearray is not. It's easier to justify optimisations on mutable types, like overallocate lists for example.
Victor
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com