Python errors as valueswww.inngest.comexternal-linkcross-posted to: hackernews@derp.foo mac ( @mac@programming.dev ) Python@programming.dev • 8 months ago message-square7fedilinkarrow-up133
arrow-up133external-linkPython errors as valueswww.inngest.com mac ( @mac@programming.dev ) Python@programming.dev • 8 months ago message-square7fedilinkcross-posted to: hackernews@derp.foo
minus-square chrismit3s ( @chrismit3s@feddit.de ) linkfedilink3•8 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.