This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Documentation of ipaddress behavior for prefix length with leading zeros.
Type: enhancement Stage:
Components: Documentation Versions: Python 3.11, Python 3.10, Python 3.9, Python 3.8, Python 3.7
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, lay20114
Priority: normal Keywords:

Created on 2022-02-03 02:46 by lay20114, last changed 2022-04-11 14:59 by admin.

Messages (1)
msg412412 - (view) Author: lay20114 (lay20114) Date: 2022-02-03 02:46
ipaddress library tolerate the prefix length with leading zeros.
$ ./python.exe 
Python 3.11.0a4+ (heads/main:8fb3649450, Jan 31 2022, 16:39:46) [Clang 13.0.0 (clang-1300.0.29.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ipaddress
>>> ipaddress.ip_interface('')
>>> ipaddress.ip_interface('2001:db8::/0000000032')

The explanation of this behavior exists in follow tests.

But, it seems that the explanation does not exists in the document.
Date User Action Args
2022-04-11 14:59:55adminsetgithub: 90778
2022-02-03 02:46:49lay20114create