|
|
|
|
|
by throwaway313373
599 days ago
|
|
What does the feature discussed in TFA (chained comparisons) have to do with Python 2 vs Python now. As another commenter pointed out [0] this feature existed since 1.4 [1]. Also, I don't understand why so many people seem to be so confused/surprised by it. I can't be 100% sure because it was a long time ago, but I think that a lot of tutorials/introductory articles mention it. Like, "Hey, did you know that Python has this cool syntaxic sugar for this thing? Fascinating!". I think that I learned about chained comparisons long before I wrote my first line of Python. [0] https://news.ycombinator.com/item?id=42038451 [1] https://docs.python.org/release/1.4/tut/node40.html#SECTION0... |
|
I still don't think it's that confusing. It does what you think it should if you're reading pseudocode, which is after all kind of Python's MO.