You are viewing a single thread.
View all comments 6 points
If 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
as tuple[User, None] | tuple[None, Exception]
, the assertion would not be necessary and the type checker wouldn’t complain.
Welcome to the Python community on the programming.dev Lemmy instance!
November 2023
October 2023
July 2023
August 2023
September 2023
255
Monthly active users
453
Posts
2.3K
Comments