Re: [Email-SIG] Dropping bytes "support" in json
Chris Withers <[email protected]>
| Newsgroups | gmane.comp.python.devel,gmane.comp.python.mime.devel |
|---|---|
| Message-ID | <[email protected]> |
Nick Coghlan wrote:
> 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.
That just feels nasty though :-(
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/python-python-dev%40m.gmane.org