Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 mixing bytes with strings
#1
a found a case where i can use bytes with strings, though there could be more such cases. what i found by experimenting is that the str.translate() method accepts bytes for the table. the table just needs to be rather long to translate some Unicode characters. and, of course, it can only translate to a character with an ordinal from 0 to 255.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Quote
#2
Do you think this is an error or a feature ?
Quote
#3
an inconsistency.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Quote
#4
Then you should write this inconsistency to Python.org.
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  supporting both strings and bytes in functions Skaperen 0 108 Nov-28-2019, 03:17 PM
Last Post: Skaperen
  print a list strings is fast but printing the joined strings is slow Skaperen 9 321 Aug-26-2019, 07:48 PM
Last Post: Skaperen
  to strings or to bytes, that is the question Skaperen 0 607 Jul-07-2018, 08:35 PM
Last Post: Skaperen

Forum Jump:


Users browsing this thread: 1 Guest(s)