Nick Coghlan writes:

 > I also suggest introducing the phrase "ASCII compatible
 > segments in binary formats" somewhere,

What is the use case for "ASCII *compatible* segments"?  Can't you
just say "ASCII segments"?

I'm not sure exactly what PEP 461 says at this point, but most of the
discussion prescribes .encode('ascii', errors='strict') for implicit
interpolation of str.  "ASCII compatible" is a term that people
consistently to interpret to include the bytes representation of their
data.  Although the actual rule isn't terribly complex (bytes 0-127
must always have ASCII coded character semantics[1]), AFAIK there are
no use cases for that other than encoded text, ie, interpolating str,
and nobody wants that done leniently in Python 3.

Footnotes: 
[1]  Otherwise you need to analyze the content of data to determine
whether "ASCII-compatible" operations are safe to perform.  Of course
that's possible but it was repeatedly rejected in favor of duck-typing.

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to