Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Assignment expression code optimization x 1.
This commit is the first in a commit chain significantly optimizing generation of **assignment expressions** (i.e., PEP 572-compliant Python expressions containing the ":=" walrus operator) throughout code snippets dynamically generated by @beartype's type-checking code generator. Since strings are expensive to repeatedly generate, @beartype now internally caches and reuses frequently used local variables across assignment expressions. In truth, this means nothing. But @leycec just *had* to do this to satisfy his aberrant OCD disorder. I swear! It isn't my fault! It's fast or it ain't @beartype. (*Tsundera or tundra!?*)
- Loading branch information