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

Method __str__

Lib/ipaddress.py:1993–1999  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1991 return "%s:%s" % (self._string_from_ip_int(high_order_bits), str(ipv4_mapped))
1992
1993 def __str__(self):
1994 ipv4_mapped = self.ipv4_mapped
1995 if ipv4_mapped is None:
1996 ip_str = super().__str__()
1997 else:
1998 ip_str = self._ipv4_mapped_ipv6_to_str()
1999 return ip_str + '%' + self._scope_id if self._scope_id else ip_str
2000
2001 def __hash__(self):
2002 return hash((self._ip, self._scope_id))

Callers 1

__str__Method · 0.45

Calls 2

superClass · 0.85

Tested by

no test coverage detected