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

Method _string_from_ip_int

Lib/ipaddress.py:1245–1255  ·  view source on GitHub ↗

Turns a 32-bit integer into dotted decimal notation. Args: ip_int: An integer, the IP address. Returns: The IP address as a string in dotted decimal notation.

(cls, ip_int)

Source from the content-addressed store, hash-verified

1243
1244 @classmethod
1245 def _string_from_ip_int(cls, ip_int):
1246 """Turns a 32-bit integer into dotted decimal notation.
1247
1248 Args:
1249 ip_int: An integer, the IP address.
1250
1251 Returns:
1252 The IP address as a string in dotted decimal notation.
1253
1254 """
1255 return '.'.join(map(str, ip_int.to_bytes(4, 'big')))
1256
1257 def _reverse_pointer(self):
1258 """Return the reverse DNS pointer name for the IPv4 address.

Callers 9

__str__Method · 0.45
__str__Method · 0.45
with_prefixlenMethod · 0.45
with_netmaskMethod · 0.45
with_hostmaskMethod · 0.45
with_prefixlenMethod · 0.45
with_netmaskMethod · 0.45
with_hostmaskMethod · 0.45

Calls 2

to_bytesMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected