A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-June/100832.html below:

[Python-Dev] email package status in 3.X

[Python-Dev] email package status in 3.XBarry Warsaw barry at python.org
Mon Jun 21 22:24:47 CEST 2010
On Jun 21, 2010, at 04:16 PM, P.J. Eby wrote:

>At 04:04 PM 6/21/2010 -0400, Barry Warsaw wrote:
>>On Jun 21, 2010, at 01:24 PM, P.J. Eby wrote:
>>
>> >OTOH, one potential problem with having the encoding on the bytes object
>> >rather than the ebytes object is that then you can't easily take > bytes from a
>> >socket and then say what encoding they are, without interfering with the
>> >sockets API (or whatever other place you get the bytes from).
>>
>>Unless the default was the "I don't know" marker and you were able to set it
>>after you've done whatever kind of application-level calculation you needed to
>>do.
>
>True, but making it a separate type with a required encoding gets rid of the magical "I don't know" - the "I don't know" encoding is just a plain old bytes object.
>
>(In principle, you could then drop *all* the stringlike methods from plain-old-bytes objects.  If it's really text-in-bytes you want, you should use an ebytes with the encoding specified.)

Yep, agreed!
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-dev/attachments/20100621/3fea0f9d/attachment.pgp>
More information about the Python-Dev mailing list

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