homepage

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 Arfrever, christian.heimes, georg.brandl, loewis, mark.dickinson, meador.inge, ncoghlan, pitrou, skrah, vstinner
Date 2012年08月29日.18:59:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <503E667B.8070804@v.loewis.de>
In-reply-to <1346263077.3344.0.camel@localhost.localdomain>
Content
Am 29.08.12 20:01, schrieb Antoine Pitrou:
>> I think the proper solution is to make memoryview objects unhashable.
>
> Disagreed. If memoryviews are to be bytes-like objects they should be
> hashable (at least when readonly).
So what specific hash algorithm do you propose?
>> Any other approach will have flaws of some kind.
>
> Not more so than equality between memoryviews.
Well, memoryviews now have a definition of equality as discussed in 
issue15573. You may disagree whether it's a useful definition, but I
don't believe it has actual flaws (in the sense that it is incorrect
or inconsistent).
My claim is that any hash definition for memoryviews will have a
*fundamental* flaw, failing to provide the basic property
that A==B must imply hash(A)==hash(B), making it actually work
incorrectly (when used for its primary application, namely keys
in dictionaries).
History
Date User Action Args
2012年08月29日 18:59:10loewissetrecipients: + loewis, georg.brandl, mark.dickinson, ncoghlan, pitrou, vstinner, christian.heimes, Arfrever, skrah, meador.inge
2012年08月29日 18:59:10loewislinkissue15814 messages
2012年08月29日 18:59:09loewiscreate

AltStyle によって変換されたページ (->オリジナル) /