[Python-ideas] Add encoding attribute to bytes

Jim Jewett jimjjewett at gmail.com
Sat Nov 7 22:07:06 CET 2009

On Thu, Nov 5, 2009 at 8:15 PM, Terry Reedy <tjreedy at udel.edu> wrote:
> A Python interpreter has one encoding for floats, ints, and strings.
> sys.float_info and sys.int_info give details about the first two.

(Instead of changing bytes,)

This suggests a sys.string_info that contains information about the
default string representation --including whether the internal
encoding is UCS2 or UCS4 or something else.

That should at least make it possible to give better diagnostic messages.


More information about the Python-ideas mailing list