News for hackers. Stuff that matters.
Re:In Memoriam: Tim Peters 1952–2026 by flykespice on Wednesday November 11, 2026 @02:41PM (#50457549)
> There should be one-- and preferably only one --obvious way to do it.

Oh boy, that didn't age well for Python language did it? It matches with C++ in growing complexity of syntax features. With a couple dozen ways to write the very same algorithm.

Re:In Memoriam: Tim Peters 1952–2026 by bigstrat2003 on Wednesday November 11, 2026 @03:02PM (#50457890)
Python has never followed the Zen. The irritating way the language lets you use non-booleans in a boolean context flies right in the face of "explicit is better than implicit".
Re:In Memoriam: Tim Peters 1952–2026 by michaeldh on Wednesday November 11, 2026 @03:31PM (#50458258)
Practicality beats purity!
Re:In Memoriam: Tim Peters 1952–2026 by logophobia on Wednesday November 11, 2026 @04:19PM (#50458838)
Except it mostly just leads to suprising bugs and time wasting, in exchange for saving a small amount of typing
Re:In Memoriam: Tim Peters 1952–2026 by loeg on Wednesday November 11, 2026 @03:38PM (#50458344)
And typing wasn't explicit for a long time. Now it is kind of best practice, but you can still produce Python without typecheck metadata.
Re:In Memoriam: Tim Peters 1952–2026 by zestyping on Wednesday November 11, 2026 @07:16PM (#50461026)
[delayed]
Re:In Memoriam: Tim Peters 1952–2026 by tacitusarc on Wednesday November 11, 2026 @07:58PM (#50461489)
Booleans are reductionist and likely harmful, as they allow programmers to avoid thinking in terms of the test they are actually performing: is this a member of some set? If the problem is reworked like that Booleans are superfluous (this representation could be compiled to something as performant as using Booleans).

I am not sure if that perspective aligns with yours.

Re:In Memoriam: Tim Peters 1952–2026 by zephen on Thursday November 12, 2026 @01:04AM (#50463604)
Not sure why you're getting downvoted so much, but to put this thought into a somewhat broader context:

In an explicitly, statically typed language, bools might be useful as a standard small enum.

In what Python used to be, they weren't, not really.

But for whatever reason, declared typing is now an add-on to the language, and the people who like the verbosity of declared typing also, perhaps schizophrenically, like the terseness afforded by having a standard small enum.

Re:In Memoriam: Tim Peters 1952–2026 by driggs on Thursday November 12, 2026 @02:35AM (#50464144)
I still have a printed stack of Python 1.5.7 docs from when I first learned the language.

The addition of boolean `True` and `False` were a huge improvement to the language when they were finally added in 2.3.

I'm not sure why you're making things more complicated than they need to be. Test for truthiness. Conditional statements already evaluate boolean expressions, you're not adding anything explicit by writing `== True`.

Re:In Memoriam: Tim Peters 1952–2026 by zephen on Thursday November 12, 2026 @01:22PM (#50471767)
> I still have a printed stack of Python 1.5.7 docs from when I first learned the language.

Argument by verified hoarder?

> The addition of boolean `True` and `False` were a huge improvement to the language when they were finally added in 2.3.

Hard disagree.

Re:In Memoriam: Tim Peters 1952–2026 by jodrellblank on Thursday November 12, 2026 @12:56PM (#50471342)
> "Every primitive type has a null value"

Does it? "bank account has 0 dollars" and "no bank account" are different states. 0 cannot (should not) try to represent both. Same for empty string, empty list, empty set, they are data not nulls. Python has None for that.

Re:In Memoriam: Tim Peters 1952–2026 by pdonis on Thursday November 12, 2026 @02:26PM (#50472813)
But None has its own type; it's not a value of any of the other primitive types. Which makes sense if you use None to represent "no data present" vs. "data present, value is the null value".
Re:In Memoriam: Tim Peters 1952–2026 by pdonis on Thursday November 12, 2026 @02:29PM (#50472871)
> it became possible to compare things as equal to True or False

Not if you just use the objects as their natural types. For example:

    >>> "" == False
    False
    >>> "a" == True
    False
> "if x" and "if x == True" are now very similar, but subtly different, ways to express the same thing.

No, they're not. See above.

Protip: Before making any claims about the behavior of a language with a REPL, test them at the REPL.

Re:In Memoriam: Tim Peters 1952–2026 by pdonis on Thursday November 12, 2026 @10:17PM (#50477736)
> If we had stuck with 0 and 1, we would have avoided all this confusion.

I don't see how. Indeed, using 0 and 1, the int values, as if they were boolean false and true created more confusion. First, int has more values than just 0 and 1--and all of them are "truthy". Second, treating 0 and 1 as booleans is still treating boolean-ness as a noun--but also confusing that with treating it as an adjective for those int values.

PEP 285, which introduced the bool type, gives other rationales as well:

https://peps.python.org/pep-0285/

Re:In Memoriam: Tim Peters 1952–2026 by benji-york on Wednesday November 11, 2026 @07:56PM (#50461478)
Do you know why it is the way it is?
Re:In Memoriam: Tim Peters 1952–2026 by isityettime on Thursday November 12, 2026 @11:51AM (#50470322)
That's because the Zen is a collection of fuzzy aphorisms about taste. Python has in fact never had a set of hard principles that constrain the design of the language.

In other traditions, type systems or the borrow checker or even vaguer things like a commitment to a "tiny core" of just a few primitives constrain language designers in a way that (sometimes inflexibly) commits them to the consequences of earlier design decisions. Python has mostly been designed one step at a time, by fiat. It's not a surprise that the result is an inconsistent language, especially after the resignation of the BDFL, and especially after so many years of widespread popularity.

Re:In Memoriam: Tim Peters 1952–2026 by buster on Wednesday November 11, 2026 @03:17PM (#50458080)
To be honest I found this sentence to be beautiful and true for many years after working a lot with php and perl. The mort important word in this sentence is obvious. There are many many many ways to do the same thing but working with python I found that mostly to be true, there is always an obvious, documented way (and not two of three!). Searching for a way to do something in perl, for example, was such a huge difference.
Re:In Memoriam: Tim Peters 1952–2026 by throwaway5752 on Wednesday November 11, 2026 @05:31PM (#50459711)
It is really more aspiration, and a good programmer mantra anywhere. Nothing here is so Python specific outside namespaces, and ... that is also a good programmer mantra.
Re:In Memoriam: Tim Peters 1952–2026 by bazoom42 on Thursday November 12, 2026 @05:01AM (#50465180)
There will always be a billion way to write the same algorithm in a Turing-complete language. That is not the point.
Re:In Memoriam: Tim Peters 1952–2026 by jacquesm on Thursday November 12, 2026 @06:43AM (#50465806)
Let's start off with 'Which Python?'
Re:In Memoriam: Tim Peters 1952–2026 by vonunov on Friday November 13, 2026 @08:48PM (#50492733)
/usr/bin/python
Re:In Memoriam: Tim Peters 1952–2026 by jacquesm on Saturday November 14, 2026 @12:01AM (#50494123)
Is that python2 or python3?
Re:In Memoriam: Tim Peters 1952–2026 by jodrellblank on Thursday November 12, 2026 @12:30PM (#50470929)
Fourth reply to the article in the link, by Chris McDonough includes:

> "You have Tim to thank at least partially if you were a refugee from Java or Microsoft languages, which made excuses for their sprawling verbosity, complexity, and poor readability. Python, at the time, made none of those and had none of that (it now does). Tim was crucial in ensuring it stayed that way during his most active years. He will claim differently, but, by my observation, it is no accident that Python ballooned in complexity after his exit as day-to-day core developer."