Elliptical Python Programming
Published on: 2025-09-02 22:53:56
Elliptical Python Programming
By Susam Pal on 10 Apr 2025
One thing I love about Python is how it comes with its very own built-in zen. In moments of tribulations, when I am wrestling with crooked code and tangled thoughts, I often find solace in its timeless wisdom. Here's a glimpse of the clarity it provides:
$ python3 -m this | grep e- There should be one-- and preferably only one --obvious way to do it.
Indeed, there is one and only one obvious way to write the number 1 in Python, like so:
>>> --(...==...) 1
You may, quite naturally, place several ones adjacently to produce larger integers:
>>> --(...==...)--(...==...) 2
And so on, ad infinitum, or until your heap collapses like a poorly made soufflé. Now, the "pre-decrement operator" at the beginning is entirely optional, much like the plus sign when you write "+5 biscuits" in a letter to your grandmother. It's not wrong, but it is unnecessary and, frankly, a bit pretentious. So unless you want to look peculiar to your col
... Read full article.