Skip to content

Version 0.11.1

Compare
Choose a tag to compare
@Technologicat Technologicat released this 22 Nov 15:02
· 2573 commits to master since this release

"Cleaning up, vol. 2" edition:

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).
  • 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 §17, 18).