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/2004-August/047953.html below:

adding a bytes sequence type to Python

[Python-Dev] Re: adding a bytes sequence type to Python [Python-Dev] Re: adding a bytes sequence type to PythonBill Janssen janssen at parc.com
Tue Aug 17 21:09:22 CEST 2004
> Does b"foo" really make much of a difference?

Yes.  My guess is that if you leave it out, you'll see

  var = u"foo".encode("ASCII")

all over the place (assuming that encode() will produce a bytes type).
Wouldn't b"foo" be more readable all around?

> Is it so hard to have to write bytes([0x66, 0x6f, 0x6f]) instead of
> b"\x66\x6f\x6f"?

No, that's true.  But if you have a bytes literal syntax, might as
well allow \x in it.

Bill
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