Skip to content

Beartype and TypeVar for type consistency accross arguments #284

Closed Answered by leycec
Louis-Pujol asked this question in Q&A
Discussion options

You must be logged in to vote

tl;dr: Plum. Plum is what you need in your life.

A longer and tedious explanation now follows that will exhaust you and make you punch the air in frustration. Also, I provide working code that solves your problem below! "Please keep reading" is what I'm saying.

First of all thanks for beartype ! It helps me a lot for detecting bugs and increasing the confidence in the consistency of my code.

Aww. 🤗

Thanks so much for the kind words, @Louis-Pujol. Python really is the Wild West of code, isn't it? Everything's anarchic, ill-defined, duck-typed, and constantly on fire. This is why we @beartype.

Sadly, even @beartype sometimes falls down on the job. Case in point: this discussion.

My quest…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Louis-Pujol
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants