[issue41972] bytes.find consistently hangs in a particular scenario

2020-10-18 Thread Dennis Sweeney
Dennis Sweeney added the comment: > Dennis, I think that's expected, right? Two-way on its own can exploit > nothing about individual characters - it only preprocesses the needle to > break the possibility for quadratic-time behavior due to periods in the > needle. Yes, that's correct. > I

[issue41972] bytes.find consistently hangs in a particular scenario

2020-10-18 Thread Dennis Sweeney
Dennis Sweeney added the comment: I posted the example thinking that having a concrete walkthrough might be good for discussion, and it looks like it was. ;-) This makes me curious how a simplified-but-not-as-simplified-as-the-status-quo Sunday algorithm would fare: using the Sunday algorith

[issue41972] bytes.find consistently hangs in a particular scenario

2020-10-18 Thread Tim Peters
Tim Peters added the comment: I confess I _assumed_ all along that you were generalizing the current code's Sunday trick to 7-bit equivalence classes (up from 32 bits total) and 64K possible shift counts (up from just 2 total possibilities: 1 or len(needle)+1). The Sunday trick couldn't care

[issue42026] index function return first index for same element if repetitive in a list

2020-10-18 Thread Chetan Palliwal
Chetan Palliwal added the comment: can you let it work using the index method then it index() is working fine. I can resolve it by using enumerate and another way. The issue I raised here for the index() method not for enumerate. -- status: closed -> open ___

[issue42026] index function return first index for same element if repetitive in a list

2020-10-18 Thread Chetan Palliwal
Chetan Palliwal added the comment: If the index() is working fine. why my previous attached code sample is returning 0 for each time I try to get the index for element 11 in the list. -- ___ Python tracker

[issue42041] venv subprocess call to python resolves to wrong interpreter

2020-10-18 Thread Mark Keller
Mark Keller added the comment: Paul explained precisely of what I was going through when I reached out to you with this: > then the "running executable" is "path/to/venv/scripts/python.exe", and so > the path containing the running executable is "path/to/venv/scripts", so a > search for "py

<    1   2