You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Minor improvements: "Constant" is now the pivot point to convert anything to lambda-friendly. It has a new alias make_lambda_friendly.
* Fixed#2 that was a bug happening when using lambda-friendly methods with non-lambda arguments
* This actually required to refactor a bit the methods: a few methods in base.py are now classmethods of _LambdaExpressionBase. This also required the code generation mechanism to generate a new file 'generated2.py' because the generated methods were now dependent upon main.py
Copy file name to clipboardExpand all lines: docs/changelog.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,8 @@
1
+
### 1.2.0 - New alias and bugfix for constant functions
2
+
3
+
* added alias `make_lambda_friendly` for `Constant`, since it is able to convert anything (constants, functions and classes) to lambda-friendly objects usable in expressions.
4
+
* Fixed [#2](https://github.com/smarie/python-mini-lambda/issues/2) that was a bug happening when using lambda-friendly methods with non-lambda arguments
5
+
1
6
### 1.1.0 - Compatibility with standard functions
2
7
3
8
* It is now possible to use any function in a lambda expression, through use of the `make_lambda_friendly_...` methods (see [documentation](./usage#supporting-any-other-methods-and-classes))
Copy file name to clipboardExpand all lines: docs/usage.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -236,7 +236,7 @@ from math import e
236
236
str(_(x + e)) # 'x + 2.718281828459045'
237
237
```
238
238
239
-
For this reason `mini_lambda` provides a `Constant()` method with alias`C()` to define a constant and assign it with a symbol.
239
+
For this reason `mini_lambda` provides a `Constant()` method with aliases`C()` and `make_lambda_friendly()` to define a constant and assign it with a symbol.
Actually the `Constant()` (alias `C()`) function that we saw above to convert constants, is also able to convert methods ans classes. So if there is only a single conversion operator to remember, remember this one.
360
+
Actually the `Constant()` (alias `C()` or `make_lambda_friendly()`) function that we saw above to convert constants, is also able to convert methods ans classes. So if there is only a single conversion operator to remember, remember this one.
0 commit comments