Mac to Python@programming.dev • 1 year agoPython errors as valueswww.inngest.comexternal-linkmessage-square18fedilinkarrow-up147arrow-down13cross-posted to: hackernews@derp.foo
arrow-up144arrow-down1external-linkPython errors as valueswww.inngest.comMac to Python@programming.dev • 1 year agomessage-square18fedilinkcross-posted to: hackernews@derp.foo
minus-square@chrismit3s@feddit.delinkfedilink6•1 year 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.