MCPcopy Index your code
hub / github.com/python/cpython / _check_echo_char

Function _check_echo_char

Lib/getpass.py:197–210  ·  view source on GitHub ↗
(echo_char)

Source from the content-addressed store, hash-verified

195
196
197def _check_echo_char(echo_char):
198 # Single-character ASCII excluding control characters
199 if echo_char is None:
200 return
201 if not isinstance(echo_char, str):
202 raise TypeError("'echo_char' must be a str or None, not "
203 f"{type(echo_char).__name__}")
204 if not (
205 len(echo_char) == 1
206 and echo_char.isprintable()
207 and echo_char.isascii()
208 ):
209 raise ValueError("'echo_char' must be a single printable ASCII "
210 f"character, got: {echo_char!r}")
211
212
213def _raw_input(prompt="", stream=None, input=None, echo_char=None,

Callers 3

unix_getpassFunction · 0.85
win_getpassFunction · 0.85
fallback_getpassFunction · 0.85

Calls 2

isprintableMethod · 0.80
isasciiMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…