MCPcopy Index your code
hub / github.com/RustPython/RustPython / prompt

Function prompt

crates/wasm/Lib/browser.py:68–76  ·  view source on GitHub ↗
(msg, default_val=None)

Source from the content-addressed store, hash-verified

66
67
68def prompt(msg, default_val=None):
69 if type(msg) != str:
70 raise TypeError("msg must be a string")
71 if default_val is not None and type(default_val) != str:
72 raise TypeError("default_val must be a string")
73
74 return _prompt.call(
75 jsstr(msg), jsstr(default_val) if default_val else UNDEFINED
76 ).as_str()

Callers

nothing calls this directly

Calls 2

as_strMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected