Tail-recursive

Latest version: v2.1.0

Safety actively analyzes 618931 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

2.1.0

Added
- `FeatureSet.NESTED_CALLS`

Changed
- `FeatureSet`s are now enum flags.

Fixed
- If `func.tail_call(...).__r<operation>__(<other>)` does not exist then `other.__<operation>__(func.tail_call(...)._resolve())` will be tried. E.g.: `[1, 2] + func.tail_call(...)` is now supported.

2.0.0

Added
- Overrides for most dunder methods called on `tail_call(...)`.

Changed
- _nested call mode_ has now been renamed to _feature set_.
There is the _base_ and _full_ feature set.
The full feature set enables nested tail calls and dunder overrides.
- `tail_call(...).__repr__` no longer pretty prints a string relating to the tail call.
Use `tail_call(...)._to_string()` to pretty print tail calls.

1.2.0

Added
- `__repr__`for functions decorated with `tail_recursive`
- `__repr__` for return values of `tail_call`
- Resolves nested tail calls (i.e. `<function>.tail_call([..., ]<function>.tail_call(...)[, ...])`)
- Mode parameter for turning resolution of tail calls on or off (i.e. `tail_recursive(nested_call_mode="resolve_nested_calls"|"do_not_resolve_nested_calls"|NestedCallMode.RESOLVE_NESTED_CALLS|NestedCallMode.DO_NOT_RESOLVE_NESTED_CALLS)`)

1.1.0

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.