Skip to content

Commit 8f2c9c3

Browse files
authored
Change is_ip to is_ip_like
1 parent 1b0f228 commit 8f2c9c3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/http/cookiejar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,8 @@ def parse_ns_headers(ns_headers):
535535
# only kept for backwards compatibilty.
536536
IPV4_RE = re.compile(r"\.\d+$", re.ASCII)
537537

538-
def is_ip(text: str):
539-
"""Return True if text is a valid IP address."""
538+
def is_ip_like(text: str):
539+
"""Return True if text is a valid hostname in the form of IP address."""
540540
from ipaddress import IPv4Address, IPv6Address
541541
# check for IPv4 address
542542
try:

0 commit comments

Comments
 (0)