github beartype/beartype v0.10.2
Beartype 0.10.2

latest releases: v0.18.5, v0.18.4, v0.18.3...
2 years ago

Beartype 0.10.2 released.

This patch release serves up salacious support for improved compliance with PEP 3102 -- Python Keyword-Only Parameters.

This patch release resolves 1 issue and merges 0 pull request. it is sad Noteworthy changes include:

Compatibility Improved

  • PEP 3102 -- Python Keyword-Only Parameters, resolving issue #102 kindly submitted by stalwart parameter-passing quarterback @dycw (Derek Wan). Previously, @beartype only supported optional keyword-only parameters strictly preceding mandatory keyword-only parameters in callable signatures. Now, @beartype supports callables whose optional and mandatory keyword-only parameters are heterogeneously mixed in any arbitrary order in callable signatures.

Features Optimized

  • Argument parsing. @beartype now parses callable signatures significantly faster, thanks to abandoning the extremely inefficient (albeit well-tested) inspect.signature() standard parser in favour of our extremely efficient (albeit not so well-tested) beartype._util.func.arg.utilfuncargiter.iter_func_args home-grown parser -- now believed to be the fastest pure-Python argument parser. Doing so significantly optimizes @beartype at decoration time. While still comparatively slow, the @beartype decorator is now within two orders of magnitude of the fastest possible decorator (i.e., noop identity decorator).

Don't miss a new beartype release

NewReleases is sending notifications on new releases.