On Mon, 13 Jan 2014 07:59:10 -0800 Guido van Rossum <guido at python.org> wrote: > On Mon, Jan 13, 2014 at 3:41 AM, Antoine Pitrou <solipsis at pitrou.net> wrote: > > What is the use case for embedding a quoted ASCII-encoded representation > > in a byte stream? > > It doesn't crash but produces undesired output (always, not only when > the data is non-ASCII) that gives the developer a hint to think about > encoding to bytes. But why is it better to give a hint by producing undesired output (which may actually go unnoticed for some time and produce issues down the road), rather than simply by raising TypeError? By that token we may simply insert an error string ("CAUTION: YOU MISS AN ENCODING HERE"), rather than the ascii() representation of the argument. Regards Antoine.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4