A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2006-March/062463.html below:

[Python-Dev] bytes thoughts

[Python-Dev] bytes thoughtsJosiah Carlson jcarlson at uci.edu
Thu Mar 16 18:13:29 CET 2006
"Christos Georgiou" <tzot at mediconsa.com> wrote:
> Well, what's the result of
> 
> bytes([1,0,0])^ bytes([1,0])
> 
> ?  Is it bytes([0,0,0]) (à la little-endian) or is it bytes([1,1,0])
> (straight conversion to base-256)?  Or perhaps throw a ValueError if the 
> sizes differ?

It's a ValueError.  If the sizes matched, it would be a per-element
bitwise xor.

> These details should be considered in the PEP.

They aren't considered because they are *obvious* to most (if not all)
sane people who use Python.  Think of future bytes behavior to be
similar to current array behavior, with a few bits and pieces added to
make life easier (like all of the current string methods, etc.)

 - Josiah

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