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/2006-March/062455.html below:

[Python-Dev] bytes thoughts

[Python-Dev] bytes thoughtsChristos Georgiou tzot at mediconsa.com
Thu Mar 16 14:08:33 CET 2006
"Greg Ewing" <greg.ewing at canterbury.ac.nz> wrote in message
news:440669B9.3000609 at canterbury.ac.nz...
> Baptiste Carvello wrote:
>
[Baptiste]
>> while manipulating binary data will happen mostly with bytes objects,
>> some
>> operations are better done with ints, like the bit manipulations with the
>> &|~^
>> operators.

[Greg]
> Why not just support bitwise operations directly
> on the bytes object?

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?

These details should be considered in the PEP.


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