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

Function _strip_ipv6_iface

Lib/http/client.py:180–186  ·  view source on GitHub ↗

Remove interface scope from IPv6 address.

(enc_name: bytes)

Source from the content-addressed store, hash-verified

178 (name.title(), data[err.start:err.end], name)) from None
179
180def _strip_ipv6_iface(enc_name: bytes) -> bytes:
181 """Remove interface scope from IPv6 address."""
182 enc_name, percent, _ = enc_name.partition(b"%")
183 if percent:
184 assert enc_name.startswith(b'['), enc_name
185 enc_name += b']'
186 return enc_name
187
188class HTTPMessage(email.message.Message):
189

Callers 1

putrequestMethod · 0.85

Calls 2

partitionMethod · 0.45
startswithMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…