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/088720.html below:

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

[Python-Dev] Dropping bytes "support" in json [Python-Dev] Dropping bytes "support" in jsonAntoine Pitrou solipsis at pitrou.net
Tue Apr 14 01:58:27 CEST 2009
Bob Ippolito <bob <at> redivi.com> writes:
> 
> The output of json/simplejson dumps for Python 2.x is either an ASCII
> bytestring (default) or a unicode string (when ensure_ascii=False).
> This is very practical in 2.x because an ASCII bytestring can be
> treated as either text or bytes in most situations, isn't going to get
> mangled over any kind of encoding mismatch (as long as it's an ASCII
> superset), and skips an encoding step if getting sent over the wire..

Which means that the json module already deals with text rather than bytes,
apart from the optimization that pure ASCII text is returned as 8-bit strings.

Regards

Antoine.


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