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/2009-April/088642.html below:

[Python-Dev] [Email-SIG] Dropping bytes "support" in json

[Python-Dev] [Email-SIG] Dropping bytes "support" in json [Python-Dev] [Email-SIG] Dropping bytes "support" in jsonNick Coghlan ncoghlan at gmail.com
Sat Apr 11 09:09:33 CEST 2009
Barry Warsaw wrote:
>> Of course, one could use message.header and message.bythdr and they'd
>> be the same length.
> 
> I was trying to figure out what  a 'thdr' was that we'd want to index
> 'by' it. :)

In the discussions about os.environ, the suggested approach was to just
tack a 'b' onto the end of the name to get the bytes version (i.e.
os.environb).

That aligns nicely with the b"" prefix for bytes literals, and isn't
much of a typing or reading burden when dealing with the bytes API
instead of the text one.

A similar naming scheme (i.e. msg.headers and msg.headersb) would
probably work for email as well.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
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