r/Python • • Nov 24 '16

The Case for Python 3

https://eev.ee/blog/2016/11/23/a-rebuttal-for-python-3/
575 Upvotes

349 comments sorted by

View all comments

Show parent comments

1

u/[deleted] Nov 24 '16

True. Embedding the guilty strings/bytes could be a solution, but that's an issue in and of itself.

The best way I've found to deal with this is to decide if something uses bytes or text and only use that inside the function, the only exception being is if something is going from bytes to text or vice versa.

But that still runs the risk of the error happening in code I didn't write (in which case, I check their issue tracker).

2

u/unruly_mattress Nov 24 '16

I agree. I think the solution is to somehow underline the offending expression.