oracle / graalpython

A Python 3 implementation built on GraalVM
Other
1.2k stars 103 forks source link

''.index('') throws ValueError, should return 0 #324

Closed The-Alchemist closed 1 year ago

The-Alchemist commented 1 year ago

GraalPython

$ python
Python 3.8.5 (Thu Jan 19 11:43:48 PST 2023)
[Graal, GraalVM CE, Java 19.0.2] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> ''.index('')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: substring not found
>>>

Python 3.9

$ python
Python 3.9.16 (main, Dec  7 2022, 10:15:43)
[Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> ''.index('')
0
>>>