Python Forum
bytearray (and bytes) in Python2
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
bytearray (and bytes) in Python2
#1
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.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
The official documentation, which you can read profitably, reveals that bytes and bytearray were added in python 2.6.
Reply
#3
i didn't want to be hitting or downloading so many different versions.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#4
Or see here:
https://stackoverflow.com/questions/1740...-2-6-and-3
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  chopping a bytearray Skaperen 2 2,076 Jul-25-2021, 11:47 PM
Last Post: Skaperen
  os.path.join, bytearray, python2 vs python3 Skaperen 0 1,987 Jul-06-2018, 01:19 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020