MCPcopy
hub / github.com/tornadoweb/tornado / parse_int

Function parse_int

tornado/http1connection.py:860–864  ·  view source on GitHub ↗

Parse a non-negative integer from a string.

(s: str)

Source from the content-addressed store, hash-verified

858
859
860def parse_int(s: str) -> int:
861 """Parse a non-negative integer from a string."""
862 if DIGITS.fullmatch(s) is None:
863 raise ValueError("not an integer: %r" % s)
864 return int(s)
865
866
867def parse_hex_int(s: str) -> int:

Callers 2

write_headersMethod · 0.85
_read_bodyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected