Mac@programming.dev to Python@programming.dev · 10 months agoPython errors as valueswww.inngest.comexternal-linkmessage-square2fedilinkarrow-up10arrow-down10
arrow-up10arrow-down1external-linkPython errors as valueswww.inngest.comMac@programming.dev to Python@programming.dev · 10 months agomessage-square2fedilink
minus-squarechrismit3s@feddit.delinkfedilinkarrow-up1·10 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.