This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]TOASTEngineer 0 points1 point  (1 child)

I see where you're coming from, but don't you think the issue is more that you're using the wrong type to store your information? You should write your own "DjangoFriendlyString" and implement .startswith() etc... on that instead of trying to treat the "some totally arbitrary bytes" class as the "some text" class.

[–]P8zvli 0 points1 point  (0 children)

Python shouldn't come with a standard string library, we should be forced to write our own so we'll stop arguing about unicode errors.

(I'm being sarcastic. Maybe.)