News for hackers. Stuff that matters.
Re:Don't Use Booleans by leobg on Tuesday July 09, 2024 @05:11AM (#40913978)
Same in Python, no?

def foo(bar: Literal["active", "inactive"])

Re:Don't Use Booleans by hardwaresofton on Tuesday July 09, 2024 @05:24AM (#40914044)
What's the best Python type checker these days?

Seems like there are at least 4: Mypy, Pytype, Pyright, and Pyre

Re:Don't Use Booleans by Terretta on Tuesday July 09, 2024 @06:19AM (#40914392)
basedpyright:

https://github.com/DetachHead/basedpyright

(assuming you can't/don't use MSFT's pylance)