2/24/2026 at 12:36:42 AM
The very first example in this post: # requests/utils.py:670
def address_in_network(ip, net):
ipaddr = struct.unpack("=L", socket.inet_aton(ip))[0]
netaddr, bits = net.split("/")
# ^^^^^^^^^^^^^^^^
# ValueError if net has no "/", BOUNDS if split returns 1 element
The BOUNDS part is technically correct, though a search over the codebase will show that it's never triggered since this function is called only after verifying net via is_valid_cidr. But the ValueError part is entirely false, "something".split("/") does not raise an error. Knowing the semantics of str.split is Python basics, so the way I interpret this result is that the authors' "favorite model" correctly inferred they won't actually question any of its outputs, and fed them a load of bullshit.
by stratos123