Python Forum

Full Version: mixing bytes with strings
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
Do you think this is an error or a feature ?
an inconsistency.
Then you should write this inconsistency to Python.org.