Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
byte string
#3
try doing that without bytearray.

i'd argue that b'foo' (a literal) becomes a regular character string because bytes==str is True. does this work in 2.0? does 2.0 matter any more?

or can you make any code which produces an actual bytes (not bytearray) type?

i've been doing stuff in Python3. but i still like to make my code work (and work right) in Python2. that is because many systems still come with Python2 but not Python3 ready to use (even though installing or upgrading to Python3 is an available option for many).
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
byte string - by Skaperen - Feb-02-2018, 03:03 AM
RE: byte string - by Gribouillis - Feb-02-2018, 05:40 AM
RE: byte string - by Skaperen - Feb-03-2018, 03:34 AM
RE: byte string - by snippsat - Feb-03-2018, 03:59 AM
RE: byte string - by Skaperen - Feb-04-2018, 03:49 AM
RE: byte string - by Gribouillis - Feb-04-2018, 08:58 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  'utf-8' codec can't decode byte 0xe2 in position 122031: invalid continuation byte tienttt 12 11,356 Sep-18-2020, 10:10 PM
Last Post: tienttt
  'utf-8' codec can't decode byte 0xda in position 184: invalid continuation byte karkas 8 31,480 Feb-08-2020, 06:58 PM
Last Post: karkas
  First Byte of a string is missing while receiving data over TCP Socket shahrukh1987 3 4,172 Nov-20-2019, 10:34 AM
Last Post: shahrukh1987
  Byte string catenation inefficient in 3.7? RMJFlack 13 5,570 Aug-18-2019, 05:19 AM
Last Post: RMJFlack
  HELP: String of Zero's and One's to binary byte schwasskin 1 3,830 May-19-2019, 07:31 AM
Last Post: heiner55
  4 byte hex byte swap from binary file medievil 7 21,941 May-08-2018, 08:16 AM
Last Post: killerrex
  get the content of the byte as string ricardons 5 3,631 Mar-02-2018, 02:41 PM
Last Post: ricardons
  byte string in python2 Skaperen 4 4,282 Nov-23-2017, 03:13 AM
Last Post: Skaperen
  Does Python 3.x have a built-in byte string compare function? Raptor88 2 16,306 Feb-18-2017, 10:44 AM
Last Post: Raptor88

Forum Jump:

User Panel Messages

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