This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skrah
Recipients Arfrever, Dag.Sverre.Seljebotn, belopolsky, christian.heimes, georg.brandl, loewis, mark.dickinson, meador.inge, ncoghlan, pitrou, scoder, skrah, vstinner
Date 2012-08-31.08:42:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20120831084230.GB27982@sleipnir.bytereef.org>
In-reply-to <1346384853.22.0.857205936594.issue15814@psf.upfronthosting.co.za>
Content
Dag Sverre Seljebotn <report@bugs.python.org> wrote:
> OK, I can understand the desire to make memoryviews be bytes-like objects
> (though to my mind, bytes is "frozen" in a very different way...)

We have two desires that sometimes conflict: People who want to use
memoryview as a *buffer* legitimately want it to behave like bytes.

People who want to have an "arrayview" want it to behave like NumPy
or PIL arrays. The new implementation preserves fast paths for bytes
and otherwise behaves pretty much like a very restricted version of
NumPy's ndarray (with support for suboffsets), except that not all
planned multi-dimensional features have been implemented yet.

> If so, and it is deemed worth it, my suggestion is to add a new
> PyBUF_CONST flag to the buffer acquisition in that case

Note that memory_hash() raises an error if the exporter *itself* is
not hashable, so it only hashes immutable objects by design.

But the PyBUF_CONST flag might be worth considering (in another issue).
History
Date User Action Args
2012-08-31 08:42:29skrahsetrecipients: + skrah, loewis, georg.brandl, mark.dickinson, ncoghlan, belopolsky, pitrou, scoder, vstinner, christian.heimes, Arfrever, meador.inge, Dag.Sverre.Seljebotn
2012-08-31 08:42:29skrahlinkissue15814 messages
2012-08-31 08:42:28skrahcreate