This is documented behaviour: https://docs.python.org/3/library/stdtypes.html#typesseq
Although I'd agree that a ValueError would be appropriate, I'd suggest raising an upstream bug about this. in https://github.com/python/cpython/issues ** Changed in: python3-defaults (Ubuntu) Status: New => Invalid -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2130498 Title: range(3,4) in range(1,6) is valid but always returns False To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/python3-defaults/+bug/2130498/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
