Unpythonic

Latest version: v0.15.1

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

Scan your dependencies

Page 5 of 7

0.8.3

- Add `scanl`, `scanr`: lazy partial fold (a.k.a. accumulate) that returns a generator yielding intermediate results.
- Also provided are `scanl1`, `scanr1` variants with one input sequence and optional init.
- Add `iterate`: return an infinite generator yielding `x`, `f(x)`, `f(f(x))`, ...
- 1-in-1-out (`iterate1`) and n-in-n-out (`iterate`) variants are provided. The n-in-n-out variant unpacks each result to the argument list of the next call.

For usage examples see `test()` in [it.py](unpythonic/it.py).

---

0.8.2

New features:

- Add currying compose functions and currying pipe (names suffixed with ``c``)

Enhancements:

- Improve reversing support in linked lists:
- Linked lists now support the builtin ``reversed`` (by internally building a reversed copy)
- ``llist`` just extracts the internal reversed copy when the input is ``reversed(some_ll)``
- Prevent stacking curried wrappers in ``curry``
- More logical naming for the ``compose`` variants.
- The first suffix, if present, is either ``1`` for one-arg variants, or ``c`` for the new currying variants.
- The ``i`` suffix for iterable input always goes last.

---

0.8.1

New feature:

- Add a toy nondeterministic evaluator `forall`; see `unpythonic.amb` module

Enhancements:

- Improve curry; see updated examples in README
- cons structures are now pickleable
- `unpythonic.llist` no longer depends on `unpythonic.tco`

---

0.8.0

Features:

- `unpythonic.it`: batteries for itertools (new)
- `unpythonic.fun`: batteries for functools (significant changes)
- m-in-n-out for pipes and function composition (new)
- `unpythonic.fup`: functionally update sequences and mappings (new)
- Load `unpythonic.llist` by default (easier, no special cases for the user)

Bugfix:

- `curry` with passthrough: use up all kwargs at the first step which got too many positional arguments (since no simple reasonable way to decide to which later application they would belong)

---

0.7.0

- Add batteries for functools: `unpythonic.fun`
- Add `cons` and friends: `unpythonic.llist` (not loaded by default; depends on `unpythonic.tco`)
- Bugfix: `rc.py` was missing from the distribution, breaking TCO

---

0.6.1

Bugfix:

- Catch `UnknownArity` in all modules that use `unpythonic.arity.arity_includes()`.

---

Page 5 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.