[Python-3000] PEP 3137: Immutable Bytes and Mutable Buffer (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Fri Sep 28 03:37:50 CEST 2007
- Previous message: [Python-3000] PEP 3137: Immutable Bytes and Mutable Buffer
- Next message: [Python-3000] PEP 3137: Immutable Bytes and Mutable Buffer
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Alexandre Vassalotti wrote:
Personally, I wouldn't mind writing either this:
for b in bytes: if b == b'a'[0]: pass
Well, I would mind, because it's needlessly verbose and inefficient.
I still think that c'x' is the least bad solution. As long as we're wanting to write arrays of integers by means of their corresponding ASCII characters, it makes sense to be able to do that for a single integer as well.
So my current vote is:
a) Indexing bytes or buffer gives an integer
b) Have a c'x' notation for expressing a single integer
-- Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | Carpe post meridiem! | Christchurch, New Zealand | (I'm not a morning person.) | greg.ewing at canterbury.ac.nz +--------------------------------------+
- Previous message: [Python-3000] PEP 3137: Immutable Bytes and Mutable Buffer
- Next message: [Python-3000] PEP 3137: Immutable Bytes and Mutable Buffer
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]