Python Forum

Full Version: bytearray (and bytes) in Python2
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i read in a couple places that bytearray is not available in Python 2. my Python 2.7.12 in Ubuntu 16.04.6 does have bytearray. was this added at some value of x in 2.x? also, the type bytes exists in 2.7.12 as an alias of str (bytes == str and bytes is str -> True). when was this alias added? i want to get the reference in some documentation to be correct.
The official documentation, which you can read profitably, reveals that bytes and bytearray were added in python 2.6.
i didn't want to be hitting or downloading so many different versions.