Jim Jewett added the comment:

I think the new wording is an improvement, but keeping the changes minimal left 
it in an awkward in-between state.

Proposal:

A string is a sequence of Unicode code points.  Strings can include any 
sequence of code points, including some which are semantically meaningless, or 
explicitly undefined.

Python doesn't have a :c:type:`char` type; a single code point is represented 
as a string of length ``1``.  The built-in function :func:`chr` translates an 
integer in the range ``U+0000 - U+10FFFF`` to the corresponding length ``1`` 
string object, and :func:`ord` does the reverse.

:meth:`str.encode` provides a concrete representation (as :class:`bytes` in the 
given text encoding) suitable for transport and communication with non-Python 
utilities.  :meth:`bytes.decode` decodes such byte sequences into text strings.

----------
nosy: +Jim.Jewett

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21667>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to