Skip to content

Version 0.13.0

Compare
Choose a tag to compare
@Technologicat Technologicat released this 25 Feb 10:45
· 2233 commits to master since this release

"I'll evaluate this later" edition:

New:

  • lazify macro: call-by-need for Python (a.k.a. lazy functions, like in Haskell)
  • frozendict: an immutable dictionary
  • mogrify: in-place map for mutable containers
  • timer: a context manager for performance testing
  • s: create lazy mathematical sequences. For example, s(1, ...), s(1, 2, ...), s(1, 2, 4, ...) and s(1, 2, ...)**2 are now valid Python. Regular function, no macros.
  • m: endow any iterable with infix math support. (But be aware that after that, applying an operation meant for general iterables drops the math support; to restore it, m(result) again.)
  • The unpythonic.llist module now provides JackOfAllTradesIterator that understands both trees and linked lists (with some compromises).
  • nb macro: a silly ultralight math notebook.

Breaking changes:

  • dyn: the asdict and items methods now return a live view.
  • The mutable single-item container Box and its data attribute value have been renamed to box and x, respectively.
  • namedlambda macro: Env-assignments are now processed lexically, just like regular assignments. Added support for let-bindings.
  • curry macro: The special mode for uninspectables is now enabled lexically within the with curry block. Also, manual uses of the curry decorator (on both def and lambda) are now detected, and in such cases the macro now skips adding the curry decorator.

Non-breaking improvements:

  • namelambda now supports renaming any function object, and also multiple times.
  • The single-item special binding syntax is now supported also by the bindings block of the dlet, dletseq, dletrec, blet, bletseq and bletrec macros.