Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #67517 > unrolled thread

Re: how to get bytes from bytearray without copying

Started byJuraj Ivančić <juraj.ivancic@gmail.com>
First post2014-03-03 09:15 +0100
Last post2014-03-03 09:15 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: how to get bytes from bytearray without copying Juraj Ivančić <juraj.ivancic@gmail.com> - 2014-03-03 09:15 +0100

#67517 — Re: how to get bytes from bytearray without copying

FromJuraj Ivančić <juraj.ivancic@gmail.com>
Date2014-03-03 09:15 +0100
SubjectRe: how to get bytes from bytearray without copying
Message-ID<mailman.7628.1393834521.18130.python-list@python.org>
On 3.3.2014. 1:44, Cameron Simpson wrote:

>> ValueError: cannot hash writable memoryview object
>
> Have you considered subclassing memoryview and giving the subclass
> a __hash__ method?

I have, and then, when I failed to subclass it, I considered doing 
aggregation, and make it behave byte-like. But how to implement the 
overridden __hash__ method? It will still require at least *some* 
redundant copying. And there is the slicing thing... the whole idea 
started to feel like I was performing tonsillectomy through the anal cavity.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web