lambdex
Write complicated anonymous functions beyond lambdas in Python. (by hsfzxjy)
blursed
Just because you can doesn't mean you should. (by ckw017)
lambdex | blursed | |
---|---|---|
4 | 1 | |
79 | 4 | |
- | - | |
0.0 | 10.0 | |
over 2 years ago | over 4 years ago | |
Python | Python | |
GNU General Public License v3.0 only | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
lambdex
Posts with mentions or reviews of lambdex.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-02-03.
-
Adding C-style for loops to Python for fun
I've attempted something more crazy -- to make Python support multi-line lambda expression [1].
It's done with AST manipulation as well, but on a larger scale and completer functionalities.
[1] https://github.com/hsfzxjy/lambdex
- hsfzxjy/lambdex lambdex allows you to write multi-line anonymous function expression (called a lambdex) in an idiomatic manner
- Write complicated anonymous functions other than lambdas in Python
- Show HN: Lambdex – Writing more complicated anonymous functions in Python
blursed
Posts with mentions or reviews of blursed.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-02-03.
-
Adding C-style for loops to Python for fun
I did something similar to option 3 to make the default numeric "callable", since the dunder __call__ methods can't be overwritten for integer types. For example, in regular arithmetic notation, something like 6(7+8) could be read as 6*(7+8), but trying to do this in Python gives you `SyntaxWarning: 'int' object is not callable;`, since you're essentially trying to do a function call on the literal 6. The workaround was to use a custom codec to wrap all integer literals to give them the expected call behavior.
Repo if anyone is interested: https://github.com/ckw017/blursed
This was inspired by a way less silly usecase, future f-strings, which added f-string support to older versions of Python in a similar way using codecs: https://github.com/asottile-archive/future-fstrings
What are some alternatives?
When comparing lambdex and blursed you can also consider the following projects:
nose-of-yeti - Provides an RSpec inspired dsl for python tests. Inspired by the yeti project found at http://github.com/fmeyer/yeti
future-fstrings - A backport of fstrings to python<3.6
pyxl - A Python extension for writing structured and reusable inline HTML.
pyxl4 - Extend Python syntax with HTML.
kagsa - KAGSA PROGRAMMING LANGUAGE