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 josh.r
Recipients fin.swimmer, josh.r, pitrou, remi.lapeyre
Date 2019-01-18.21:01:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1547845277.59.0.06844402795.issue20399@roundup.psfhosted.org>
In-reply-to
Content
Not my use case specifically, but my link in the last post (repeated below) was to a StackOverflow answer to a problem where using buffer was simple and fast, but memoryview required annoying workarounds. Admittedly, in most cases it's people wanting to do this with strings, so in Python 3 it only actually works if you convert to bytes first (possibly wrapped in a memoryview cast to a larger width if you need to support ordinals outside the latin-1 range). But it seems a valid use case.

Examples where rich comparisons were needed include:

Effcient way to find longest duplicate string for Python (From Programming Pearls) - https://stackoverflow.com/a/13574862/364696 (which provides a side-by-side comparison of code using buffer and memoryview, and memoryview lost, badly)

strcmp for python or how to sort substrings efficiently (without copy) when building a suffix array - https://stackoverflow.com/q/2282579/364696 (a case where they needed to sort based on potentially huge suffixes of huge strings, and didn't want to end up copying all of them)
History
Date User Action Args
2019-01-18 21:01:19josh.rsetrecipients: + josh.r, pitrou, fin.swimmer, remi.lapeyre
2019-01-18 21:01:17josh.rsetmessageid: <1547845277.59.0.06844402795.issue20399@roundup.psfhosted.org>
2019-01-18 21:01:17josh.rlinkissue20399 messages
2019-01-18 21:01:17josh.rcreate