Re:Python types have an expectations problem
by pharmakom on Monday January 29, 2024 @03:26PM
(#39182010)
But if x is an int, the result is an int
If x is a list, the result is a list
I don’t think that the type system can describe this.
Re:Python types have an expectations problem
by olejorgenb on Monday January 29, 2024 @07:19PM
(#39184670)
def fooify(x: int | list[int])