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 loewis
Recipients Alexander.Belopolsky, Arfrever, Dag.Sverre.Seljebotn, belopolsky, christian.heimes, georg.brandl, loewis, mark.dickinson, meador.inge, ncoghlan, pitrou, python-dev, skrah, vstinner
Date 2012-09-03.19:59:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <50450C05.4010505@v.loewis.de>
In-reply-to <8E6973A6-3FB4-4964-9F10-757D810B9351@gmail.com>
Content
Am 02.09.2012 16:21, schrieb Alexander Belopolsky:
> I have refrained from voting because in my line of work buffers or
> memoryviews deal with large objects that rarely serve as dictionary
> keys.  As a result, I have zero experince with hashing of buffers.
> This observation supports the current consensus to limit hashing to
> 1d and 0d cases.  My only concern is that with hash(m) ==
> hash(m.tobytes()) implementing multidimensional restriction will
> require artificial  if ndim > 1 check and an extra sentence in the
> docs while not simplifying anything.

As for the "not simplifying argument": if hashing was restricted
to contiguous bytes, then the implementation would certainly be
simplified quite a bit: currently, if it's not contiguous, it needs
to make a separate copy and hash that. This code could go away
if hashing would only work for true memory "blocks".
History
Date User Action Args
2012-09-03 19:59:03loewissetrecipients: + loewis, georg.brandl, mark.dickinson, ncoghlan, belopolsky, pitrou, vstinner, christian.heimes, Arfrever, skrah, meador.inge, Alexander.Belopolsky, python-dev, Dag.Sverre.Seljebotn
2012-09-03 19:59:02loewislinkissue15814 messages
2012-09-03 19:59:02loewiscreate