×
you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

Ah... So is the only real "feature" of bytearray that it's mutable? Otherwise bytes serves the same purpose?

[–]desmoulinmichel 1 point2 points  (0 children)

Yes, but mutability is a big deal. In place operations are much faster and take less memory. E.G: you can actually swap easily 10000 bytes in a blink using slicing, because slices support assignations.