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

[Python-Dev] adding a bytes sequence type to Python

[Python-Dev] adding a bytes sequence type to Python [Python-Dev] adding a bytes sequence type to PythonSkip Montanaro skip at pobox.com
Thu Aug 12 21:19:22 CEST 2004
    >> This is the approach taken in the other languages: Everytime the
    >> array display is executed, a new array is created. There is then no
    >> problem with that being mutable.

    Guido> The downside of that is that then for performance reasons you
    Guido> might end up having to move bytes literals out of expressions if
    Guido> they are in fact used read-only (which the compiler can't know
    Guido> but the user can).

Wouldn't the compiler be able to tell it was to be treated specially if it
saw b"GET"?  In that case, the code generated for

    x = b"GET"

would be something like

    LOAD_CONST     "GET"
    LOAD_NAME      bytes
    CALL_FUNCTION  1
    STORE_FAST     x

Skip
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