Version 0.13.0
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 dictionarymogrify
: in-placemap
for mutable containerstimer
: a context manager for performance testings
: create lazy mathematical sequences. For example,s(1, ...)
,s(1, 2, ...)
,s(1, 2, 4, ...)
ands(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 providesJackOfAllTradesIterator
that understands both trees and linked lists (with some compromises). nb
macro: a silly ultralight math notebook.
Breaking changes:
dyn
: theasdict
anditems
methods now return a live view.- The mutable single-item container
Box
and its data attributevalue
have been renamed tobox
andx
, 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 thewith curry
block. Also, manual uses of thecurry
decorator (on bothdef
andlambda
) are now detected, and in such cases the macro now skips adding thecurry
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
andbletrec
macros.