Why does Python even allow this? Chained comparison jank.

Python allows multiple comparisons chained together in the same expression. They have their uses, but the chaining can become confusing when operators of different types are mixed. Why is it that less than and greater than are allowed to be chained together? I think this is confusing and should potentially even be removed from Python. ― mCoding with James Murphy () Source code: Chained comparison docs: PEP to expand chained comparison: SUPPORT ME ⭐ --------------------------------------------------- Sign up on Patreon to get your donor role and early access to videos! Feeling generous but don’t have a Patreon? Donate via PayPal! (No sign up needed.) Top patrons and donors: Laura M, Jameson, John Martin, Vahnekie, Pieter G, Sigmanificient AFFILIATES AND REFER
Back to Top