On 10 January 2016 at 00:17, Blake Griffith wrote:
> A little update, I got ^, &, and | working for bytearrays. You can view the
> diff here:
> https://github.com/python/cpython/compare/master...cowlicks:bitwise-bytes?expand=1
>
> How does it look?
I left some comments against your commits on Git
On Jan 9, 2016, at 16:17, Blake Griffith wrote:
>
> A little update, I got ^, &, and | working for bytearrays. You can view the
> diff here:
> https://github.com/python/cpython/compare/master...cowlicks:bitwise-bytes?expand=1
If you upload the diff to the issue on the tracker, the reitveld code
A little update, I got ^, &, and | working for bytearrays. You can view the
diff here:
https://github.com/python/cpython/compare/master...cowlicks:bitwise-bytes?expand=1
How does it look?
Joe, is this how I should allocate the arrays? Am I freeing them properly?
Am I checking the input enough?
Af
On 07Jan2016 16:12, Python-Dev wrote:
On Jan 7, 2016, at 15:57, Martin Panter wrote:
On 7 January 2016 at 22:26, Blake Griffith wrote:
I'm interested in adding the functionality to do something like:
b'a' ^ b'b'
b'\x03'
Instead of the good ol' TypeError.
I think both bytes and bytearray sh
Thanks for the quick responses y'all. I have something compiling on my
branch, which is enough for me tonight.
I asked a question about this on stackoverflow a while ago, it wasn't very
popular
https://stackoverflow.com/questions/32658420/why-cant-you-xor-bytes-objects-in-python
Someone there poi
On Jan 7, 2016, at 15:57, Martin Panter wrote:
>
>> On 7 January 2016 at 22:26, Blake Griffith
>> wrote:
>> I'm interested in adding the functionality to do something like:
>>
> b'a' ^ b'b'
>> b'\x03'
>>
>>
>> Instead of the good ol' TypeError.
>>
>> I think both bytes and bytearray sho
On 7 January 2016 at 22:26, Blake Griffith wrote:
> I'm interested in adding the functionality to do something like:
>
b'a' ^ b'b'
> b'\x03'
>
>
> Instead of the good ol' TypeError.
>
> I think both bytes and bytearray should support all the bitwise operations.
There is a bug open about add
You want to put the `xor` method in the `nb_xor` field of the
`PyNumberMethods` structure that lives in the `tp_as_number` field of the
bytes type object. Two things I noticed in a quick pass: you might want to
add some type checking around the case where `a` or `b` is not a
`PyByteArray` object. A
On Thu, 7 Jan 2016 at 14:29 Blake Griffith
wrote:
> Hi!
>
> I'm interested in adding the functionality to do something like:
>
> >>> b'a' ^ b'b'
> b'\x03'
>
>
> Instead of the good ol' TypeError.
>
> I think both bytes and bytearray should support all the bitwise operations.
>
> I've never hacke
Hi!
I'm interested in adding the functionality to do something like:
>>> b'a' ^ b'b'
b'\x03'
Instead of the good ol' TypeError.
I think both bytes and bytearray should support all the bitwise operations.
I've never hacked on cpython before. I'm starting by just trying to add xor
to bytearray
10 matches
Mail list logo