]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-87245: Improve IPv6Address.ipv4_mapped documentation (#92572)
authorwouter bolsterlee <wouter@bolsterl.ee>
Mon, 4 May 2026 13:03:20 +0000 (15:03 +0200)
committerGitHub <noreply@github.com>
Mon, 4 May 2026 13:03:20 +0000 (23:03 +1000)
Avoid the phrasing ‘starting with ::FFFF/96’, which is confusing since
it seems to mix a prefix and a range. Instead, make it clear what the
actual range is, and refer to the relevant RFC.

Closes #87245.

Doc/library/ipaddress.rst

index ba20310d63b2775f08195d847e7b19205c89ce0c..9ccd8602bcb2c337ff3defa1fa716fdcfb1230bb 100644 (file)
@@ -367,9 +367,9 @@ write code that handles both IP versions correctly.  Address objects are
 
    .. attribute:: ipv4_mapped
 
-      For addresses that appear to be IPv4 mapped addresses (starting with
-      ``::FFFF/96``), this property will report the embedded IPv4 address.
-      For any other address, this property will be ``None``.
+      For addresses that appear to be IPv4 mapped addresses in the range
+      ``::FFFF:0:0/96`` as defined by :RFC:`4291`, this property reports the
+      embedded IPv4 address. For any other address, this property will be ``None``.
 
    .. attribute:: scope_id