Mac to Python • 11 months agoPython errors as valueswww.inngest.comexternal-linkmessage-square18arrow-up147arrow-down13
arrow-up144arrow-down1external-linkPython errors as valueswww.inngest.comMac to Python • 11 months agomessage-square18
minus-square@[email protected]linkfedilink6•11 months agoIf you wrote the type signature of get_user as tuple[User, None] | tuple[None, Exception], the assertion would not be necessary and the type checker wouldn’t complain.
If you wrote the type signature of
get_user
astuple[User, None] | tuple[None, Exception]
, the assertion would not be necessary and the type checker wouldn’t complain.