Message287572
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? |
|
Date |
User |
Action |
Args |
2017-02-10 22:57:09 | steven.daprano | set | recipients:
+ steven.daprano, terry.reedy, george-shuklin |
2017-02-10 22:57:09 | steven.daprano | set | messageid: <1486767429.27.0.284508931837.issue29511@psf.upfronthosting.co.za> |
2017-02-10 22:57:09 | steven.daprano | link | issue29511 messages |
2017-02-10 22:57:08 | steven.daprano | create | |
|