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 steven.daprano
Recipients george-shuklin, steven.daprano, terry.reedy
Date 2017-02-10.22:57:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1486767429.27.0.284508931837.issue29511@psf.upfronthosting.co.za>
In-reply-to
Content
Terry, I'm not sure if you've read this enhancement request correctly or not, because your reply when closing covers over a lot of detail which is not relevant to this feature request.

> Extending this idea to 'subsequence in sequence' or sequence.index(subsequence) has been rejected.

And so it should, as that is a major break with backwards compatibility, but that is not what this feature request is about.

Including George's link, I count at least five questions on StackOverflow asking about this functionality: how to do subsequence tests in sequences apart from strings. That, and the interest in the recipes on ActiveState (here's another: http://code.activestate.com/recipes/117214/ ) indicate a reasonable level of interest in this feature.

In Python today, there is no obvious, good, correct way to do this in the standard library, just a bunch of hacks and tricks which solve slightly different problems.

Unless the very idea of subsequence matching has been rejected (which would surprise me greatly) I'm going to re-open this ticket. Any objections?
History
Date User Action Args
2017-02-10 22:57:09steven.dapranosetrecipients: + steven.daprano, terry.reedy, george-shuklin
2017-02-10 22:57:09steven.dapranosetmessageid: <1486767429.27.0.284508931837.issue29511@psf.upfronthosting.co.za>
2017-02-10 22:57:09steven.dapranolinkissue29511 messages
2017-02-10 22:57:08steven.dapranocreate