Library-Of-Pybel icon indicating copy to clipboard operation
Library-Of-Pybel copied to clipboard

Searching for any text starting with "a" fails

Open DivineWinds opened this issue 1 year ago • 0 comments

Trying to search for a string that starts with one or more "a"s will instead find a string with those "a"s removed, which will cause the assertion on line 177 to fail. The reason this happens seems to be that the toText and stringToNumber functions act like base 29 versions of the int2base function and the builtin str to int conversion respectively, without taking into account that the latter ignore leading zeroes. This results in stringToNumber('a'*n)==stringToNumber('') for all n and toText(x) != 'a'*n for all x and all n > 1.

DivineWinds avatar Dec 24 '23 01:12 DivineWinds