News for hackers. Stuff that matters.
Re:What the Fuck Python by jonathrg on Sunday July 20, 2025 @06:53AM (#44623875)
bool() is not a function named after a fundamental type. bool is a type. As with any type, you can call bool(...) to construct a new object of that type.

https://docs.python.org/3/library/functions.html#bool

A good tutorial will reflect this fact and use appropriate language.

Both the idea that you can "cast", and the idea that bool is a function, are misunderstandings rooted in the idea that Python should be like C in all ways.

There are no comments on this comment yet.