On 01.09.16 22:36, Ethan Furman wrote:
* Add ``bytes.iterbytes`` and ``bytearray.iterbytes`` alternative iterators
Could you please add a mention of alternative: seqtools.chunks()?
seqtools.chunks(bytes, 1) and seqtools.chunks(bytearray, 1) should be
equivalent to bytes.iterbytes() and bytear
On Mon, Sep 5, 2016 at 6:06 AM, Nick Coghlan wrote:
> On 5 September 2016 at 06:42, Koos Zevenhoven wrote:
>> On Sun, Sep 4, 2016 at 6:38 PM, Nick Coghlan wrote:
>>>
>>> There are two self-consistent sets of names:
>>>
>>
>> Let me add a few. I wonder if this is really used so much that
>> bytes
On Mon, Sep 5, 2016 at 3:30 AM, Random832 wrote:
> On Sun, Sep 4, 2016, at 16:42, Koos Zevenhoven wrote:
>> On Sun, Sep 4, 2016 at 6:38 PM, Nick Coghlan wrote:
>> >
>> > There are two self-consistent sets of names:
>> >
>>
>> Let me add a few. I wonder if this is really used so much that
>> bytes
On 09/03/2016 09:48 AM, Nick Coghlan wrote:
On 3 September 2016 at 21:35, Martin Panter wrote:
On 3 September 2016 at 08:47, Victor Stinner wrote:
Le samedi 3 septembre 2016, Random832 a écrit :
On Fri, Sep 2, 2016, at 19:44, Ethan Furman wrote:
The problem with only having `bchr` is that i
On 5 September 2016 at 06:42, Koos Zevenhoven wrote:
> On Sun, Sep 4, 2016 at 6:38 PM, Nick Coghlan wrote:
>>
>> There are two self-consistent sets of names:
>>
>
> Let me add a few. I wonder if this is really used so much that
> bytes.chr is too long to type (and you can do bchr = bytes.chr if y
On Sun, Sep 4, 2016, at 16:42, Koos Zevenhoven wrote:
> On Sun, Sep 4, 2016 at 6:38 PM, Nick Coghlan wrote:
> >
> > There are two self-consistent sets of names:
> >
>
> Let me add a few. I wonder if this is really used so much that
> bytes.chr is too long to type (and you can do bchr = bytes.chr
On Sun, Sep 4, 2016 at 6:38 PM, Nick Coghlan wrote:
>
> There are two self-consistent sets of names:
>
Let me add a few. I wonder if this is really used so much that
bytes.chr is too long to type (and you can do bchr = bytes.chr if you
want to):
bytes.chr (or bchr in builtins)
bytes.chr_at, byte
On 4 September 2016 at 20:43, Koos Zevenhoven wrote:
> On Sun, Sep 4, 2016 at 12:51 PM, Nick Coghlan wrote:
>> That said, the PEP does propose "getbyte()" and "iterbytes()" for
>> bytes-oriented indexing and iteration, so there's a reasonable
>> consistency argument in favour of also proposing "b
On Sun, Sep 4, 2016 at 12:51 PM, Nick Coghlan wrote:
> On 4 September 2016 at 08:11, Random832 wrote:
>> On Sat, Sep 3, 2016, at 18:06, Koos Zevenhoven wrote:
>>> I guess one reason I don't like bchr (nor chrb, really) is that they
>>> look just like a random sequence of letters in builtins, but
On 4 September 2016 at 08:11, Random832 wrote:
> On Sat, Sep 3, 2016, at 18:06, Koos Zevenhoven wrote:
>> I guess one reason I don't like bchr (nor chrb, really) is that they
>> look just like a random sequence of letters in builtins, but not
>> recognizable the way asdf would be.
>>
>> I guess I
On Sun, Sep 4, 2016 at 1:23 AM, Ivan Levkivskyi wrote:
> On 4 September 2016 at 00:11, Random832 wrote:
>>
>> On Sat, Sep 3, 2016, at 18:06, Koos Zevenhoven wrote:
>> > I guess one reason I don't like bchr (nor chrb, really) is that they
>> > look just like a random sequence of letters in builtin
On 4 September 2016 at 00:11, Random832 wrote:
> On Sat, Sep 3, 2016, at 18:06, Koos Zevenhoven wrote:
> > I guess one reason I don't like bchr (nor chrb, really) is that they
> > look just like a random sequence of letters in builtins, but not
> > recognizable the way asdf would be.
> >
> > I gu
On Sat, Sep 3, 2016 at 6:41 PM, Ethan Furman wrote:
>>>
>>> Open Questions
>>> ==
>>>
>>> Do we add ``iterbytes`` to ``memoryview``, or modify
>>> ``memoryview.cast()`` to accept ``'s'`` as a single-byte interpretation?
>>> Or
>>> do we ignore memory for now and add it later?
>>
>>
>>
On Sat, Sep 3, 2016, at 18:06, Koos Zevenhoven wrote:
> I guess one reason I don't like bchr (nor chrb, really) is that they
> look just like a random sequence of letters in builtins, but not
> recognizable the way asdf would be.
>
> I guess I have one last pair of suggestions for the name of this
On Sat, Sep 3, 2016, at 08:08, Martin Panter wrote:
> On 1 September 2016 at 19:36, Ethan Furman wrote:
> > Deprecation of current "zero-initialised sequence" behaviour without removal
> >
> >
> > Currently, the ``bytes
On Sat, Sep 3, 2016 at 7:59 PM, Nick Coghlan wrote:
> On 3 September 2016 at 03:54, Koos Zevenhoven wrote:
>> chrb seems to be more in line with some bytes versions in for instance os
>> than bchr.
>
> The mnemonic for the current name in the PEP is that bchr is to chr as
> b"" is to "". The PEP
On 3 September 2016 at 03:54, Koos Zevenhoven wrote:
> chrb seems to be more in line with some bytes versions in for instance os
> than bchr.
The mnemonic for the current name in the PEP is that bchr is to chr as
b"" is to "". The PEP should probably say that in addition to pointing
out the 'unic
On 3 September 2016 at 21:35, Martin Panter wrote:
>> Le samedi 3 septembre 2016, Random832 a écrit :
>>> On Fri, Sep 2, 2016, at 19:44, Ethan Furman wrote:
>>> > The problem with only having `bchr` is that it doesn't help with
>>> > `bytearray`;
>>>
>>> What is the use case for bytearray.fromord
On 09/02/2016 06:17 PM, Greg Ewing wrote:
Ethan Furman wrote:
The problem with only having `bchr` is that it doesn't
help with `bytearray`; the problem with not having
`bchr` is who wants to write `bytes.fromord`?
If we called it 'bytes.fnord' (From Numeric Ordinal)
people would want to wr
On 09/03/2016 05:08 AM, Martin Panter wrote:
On 1 September 2016 at 19:36, Ethan Furman wrote:
Deprecation of current "zero-initialised sequence" behaviour without removal
Currently, the ``bytes`` and ``bytearray`` c
On 1 September 2016 at 19:36, Ethan Furman wrote:
> Deprecation of current "zero-initialised sequence" behaviour without removal
>
>
> Currently, the ``bytes`` and ``bytearray`` constructors accept an integer
> argument a
> Le samedi 3 septembre 2016, Random832 a écrit :
>> On Fri, Sep 2, 2016, at 19:44, Ethan Furman wrote:
>> > The problem with only having `bchr` is that it doesn't help with
>> > `bytearray`;
>>
>> What is the use case for bytearray.fromord? Even in the rare case
>> someone needs it, why not bytea
On 2 September 2016 at 17:54, Koos Zevenhoven wrote:
> On Thu, Sep 1, 2016 at 10:36 PM, Ethan Furman wrote:
>> * Deprecate passing single integer values to ``bytes`` and ``bytearray``
>> * Add ``bytes.fromsize`` and ``bytearray.fromsize`` alternative
>> constructors
>> * Add ``bytes.fromord`` and
Yes, this was my point: I don't think that we need a bytearray method to
create a mutable string from a single byte.
Victor
Le samedi 3 septembre 2016, Random832 a écrit :
> On Fri, Sep 2, 2016, at 19:44, Ethan Furman wrote:
> > The problem with only having `bchr` is that it doesn't help with
>
Ethan Furman wrote:
The problem with only having `bchr` is that it doesn't help with
`bytearray`; the problem with not having `bchr` is who wants to write
`bytes.fromord`?
If we called it 'bytes.fnord' (From Numeric Ordinal)
people would want to write it just for the fun factor.
--
Greg
_
On Fri, Sep 2, 2016, at 19:44, Ethan Furman wrote:
> The problem with only having `bchr` is that it doesn't help with
> `bytearray`;
What is the use case for bytearray.fromord? Even in the rare case
someone needs it, why not bytearray(bchr(...))?
___
Pyt
On 09/01/2016 04:07 PM, Victor Stinner wrote:
2016-09-02 0:04 GMT+02:00 Ethan Furman:
- `fromord` to replace the mistaken purpose of the default constructor
To replace a bogus bytes(obj)? If someone writes bytes(obj) but expect
to create a byte string from an integer, why not using bchr() to
Some quick comments below, a few more later:
On Thu, Sep 1, 2016 at 10:36 PM, Ethan Furman wrote:
> One more iteration. PEPs repo not updated yet. Changes are renaming of
> methods to be ``fromsize()`` and ``fromord()``, and moving ``memoryview``
to
> an Open Questions section.
>
>
> PEP: 467
> T
2016-09-02 0:04 GMT+02:00 Ethan Furman :
> - `fromord` to replace the mistaken purpose of the default constructor
To replace a bogus bytes(obj)? If someone writes bytes(obj) but expect
to create a byte string from an integer, why not using bchr() to fix
the code?
Victor
__
On 09/01/2016 02:06 PM, Victor Stinner wrote:
2016-09-01 21:36 GMT+02:00 Ethan Furman:
Abstract
This PEP proposes five small adjustments to the APIs of the ``bytes`` and
``bytearray`` types to make it easier to operate entirely in the binary
domain:
You should add bchr() in the Abs
2016-09-01 21:36 GMT+02:00 Ethan Furman :
> Abstract
>
>
> This PEP proposes five small adjustments to the APIs of the ``bytes`` and
> ``bytearray`` types to make it easier to operate entirely in the binary
> domain:
You should add bchr() in the Abstract.
> * Deprecate passing single in
One more iteration. PEPs repo not updated yet. Changes are renaming of
methods to be ``fromsize()`` and ``fromord()``, and moving ``memoryview`` to an
Open Questions section.
PEP: 467
Title: Minor API improvements for binary sequences
Version: $Revision$
Last-Modified: $Date$
Author: Nick Co
32 matches
Mail list logo