RSSAmplifier

From Scratch Code RSS Feed · Oct 20, 2025

Python’s operator chaining is mildly interesting

0
Sign in to vote or save

This site took too long to answer. You can still read it on the original site — the toolbar below keeps your place in the directory.

Nary a week ago, I typed a harmless expression into my Memphis REPL: 4 == 4 == 4 . My REPL’s response? False . I’m glad it can speak its mind, but the gall! Apparently, you can’t just treat a chain of comparison operators like a tree of binary expressions. According to my BlueSky timestamps , it took me 13 minutes to figure this out. And I’m here today so you don’t make the same misunderstanding I…

Read on fromscratchcode.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.