Unpythonic

Latest version: v0.15.3

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

Scan your dependencies

Page 3 of 7

0.11.1

**Enhancements**:

- Create a proper decorator registry for the syntax machinery.
- Can now register priorities for custom decorators to tell the syntax system about their correct ordering (for ``sort_lambda_decorators``, ``suggest_decorator_index``).
- Register priorities for (some of) unpythonic's own decorators using this new system, replacing the old hardcoded decorator registry.
- Now lives in ``unpythonic.regutil``; used only by the syntax subsystem, but doesn't require MacroPy just to start up.
- Try to determine correct insertion index for ``trampolined`` and ``curry`` decorators in macros that insert them to ``decorator_list`` of ``FunctionDef`` nodes (using any already applied known decorators as placement hints, [like a programmer would](http://wiki.c2.com/?LazinessImpatienceHubris)).
- ``namedlambda``: recognize also decorated lambdas, and calls to ``curry`` where the last argument is a lambda (useful for ``looped_over`` et al.).

**Breaking change**:

- Remove the special jump target ``SELF``.
- Was always a hack; no longer needed now that v0.11.0 introduced the general solution: the ``withself`` function that allows a lambda to refer to itself anywhere, not just in a ``jump``.
- Now the whole thing is easier to explain, so likely a better idea ([ZoP](https://www.python.org/dev/peps/pep-0020/) §17, 18).

---

0.11.0

New:

- Add callwith: freeze arguments, choose function later
- Add withself: allow a lambda to refer to itself
- Add let_syntax: splice code at macro expansion time
- Add quicklambda: block macro to combo our blocks with MacroPy's quick_lambda
- Add debug option to MacroPy bootstrapper

Enhancements:

- prefix macro now works together with let and do

Bugfixes:

- detect TCO'd lambdas correctly (no longer confused by intervening FunctionDef nodes with TCO decorators)
- scoping: detect also names bound by For, Import, Try, With

Breaking changes:

- Rename dynscope --> dynassign; technically dynamic assignment, not scoping
- Rename localdef --> local; shorter, more descriptive
- scanr now returns results in the order computed (**CAUTION**: different from Haskell)
- simple_let, simple_letseq --> let, letseq in unpythonic.syntax.simplelet
- cons now prints pythonically by default, to allow eval; use .lispyrepr() to get the old output
- Remove separate dynvar curry_toplevel_passthrough; expose curry_context instead

Other:

- Reorganize source tree, tests now live inside the project
- Pythonize runtests, no more bash script
- Add countlines Python script to estimate project size

---

0.10.4

- new: macro wrappers for the let decorators
- fix: trampolined() should go on the outside even if the client code manually uses curry()
- enh: improve tco, fploop combo
- enh: improve lexical scoping support

---

0.10.3

- enh: ``curry`` macro now curries also definitions (``def``, ``lambda``), not only calls
- fix: spurious recomputation bug in ``do[]``
- update and fix READMEs and docstrings

---

0.10.2

Bugfixes:

- Arities:
- Compute arities of methods correctly
- Workaround for some builtins being uninspectable or reporting incorrect arities
- Macros:
- An implicit ``curry(f)`` should call ``f`` also if no args
- Fix missing ``optional_vars`` in manually created ``withitem`` nodes

---

0.10.1

- ``continuations``: create continuation using same node type (``FunctionDef`` or ``AsyncFunctionDef``) as its parent function
- ``autoreturn``: fix semantics of try block
- fix docstring of tco

---

Page 3 of 7

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.