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

[Python-Dev] Re: 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 Python"Martin v. Löwis" martin at v.loewis.de
Wed Aug 18 07:01:50 CEST 2004
M.-A. Lemburg wrote:
> Anyway, this whole discussion about a new bytes type doesn't
> really solve the problem that the b'...' literal was
> intended for: that of having a nice way to define (read-only)
> 8-bit binary string literals.

But why do you need a way to spell 8-bit string literals?
You can always do

    "string".encode("L1")

If that is too much typing, do

    def b(s):return s.encode("L1")

    b("string")

Regards,
Martin
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