MCPcopy
hub / github.com/pyodide/pyodide / index

Method index

src/py/_pyodide/_core_docs.py:1014–1019  ·  view source on GitHub ↗

Return first ``index`` at which ``value`` appears in the ``Array``. Raises :py:exc:`ValueError` if the value is not present.

(self, /, value: T, start: int = 0, stop: int = sys.maxsize)

Source from the content-addressed store, hash-verified

1012 """Append object to the end of the list."""
1013
1014 def index(self, /, value: T, start: int = 0, stop: int = sys.maxsize) -> int:
1015 """Return first ``index`` at which ``value`` appears in the ``Array``.
1016
1017 Raises :py:exc:`ValueError` if the value is not present.
1018 """
1019 raise NotImplementedError
1020
1021 def count(self, /, x: T) -> int:
1022 """Return the number of times x appears in the list."""

Callers 4

test_jsarray_indexFunction · 0.80
test_nested_syncifyFunction · 0.80
cert_time_to_secondsFunction · 0.80
should_load_dynlibFunction · 0.80

Calls

no outgoing calls

Tested by 2

test_jsarray_indexFunction · 0.64
test_nested_syncifyFunction · 0.64