[Python-Dev] bytes thoughts (original) (raw)
Christos Georgiou tzot at mediconsa.com
Fri Mar 17 09:26:26 CET 2006
- Previous message: [Python-Dev] bytes thoughts
- Next message: [Python-Dev] bytes thoughts
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Josiah Carlson" <jcarlson at uci.edu> wrote in message news:20060316090941.F73B.JCARLSON at uci.edu...
"Christos Georgiou" <tzot at mediconsa.com> wrote:
[Christos]
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?
[Josiah]
It's a ValueError. If the sizes matched, it would be a per-element bitwise xor.
I agree ("in the face of ambiguity..."), although I understand that it wasn't obvious that I do from the way I asked the question, which I was expecting Greg to answer :)
[Christos]
These details should be considered in the PEP.
[Josiah]
They aren't considered because they are obvious to most (if not all) sane people who use Python.
I beg to disagree. I don't know whether you are Dutch or not, but most of the Python users aren't; one of the reason PEPs exist is to explain what should "be obvious at first" when one is Dutch ;-) Apart from joking, PEPs should be a record of beating/thinking the PEP subject to its death: "The PEP author is responsible for building consensus within the community and documenting dissenting opinions."
- Previous message: [Python-Dev] bytes thoughts
- Next message: [Python-Dev] bytes thoughts
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]