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

Method port

Lib/urllib/parse.py:176–185  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

174
175 @property
176 def port(self):
177 port = self._hostinfo[1]
178 if port is not None:
179 if port.isdigit() and port.isascii():
180 port = int(port)
181 else:
182 raise ValueError(f"Port could not be cast to integer value as {port!r}")
183 if not (0 <= port <= 65535):
184 raise ValueError("Port out of range 0-65535")
185 return port
186
187 __class_getitem__ = classmethod(types.GenericAlias)
188

Callers 1

get_ip_addr_tupleFunction · 0.80

Calls 2

isdigitMethod · 0.45
isasciiMethod · 0.45

Tested by

no test coverage detected