Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 to strings or to bytes, that is the question
#1
when i convert control character representation to what it represents, should a function that does this return a string or return bytes (in python3)?

convertcc('^'+'M'+'\\'+'n') -> '\r\n'
vs
convertcc('^'+'M'+'\\'+'n') -> b'\r\n'
?
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  supporting both strings and bytes in functions Skaperen 0 111 Nov-28-2019, 03:17 PM
Last Post: Skaperen
  print a list strings is fast but printing the joined strings is slow Skaperen 9 322 Aug-26-2019, 07:48 PM
Last Post: Skaperen
  mixing bytes with strings Skaperen 3 430 May-29-2019, 02:30 AM
Last Post: heiner55

Forum Jump:


Users browsing this thread: 1 Guest(s)