-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default arguments transform is not equivalent #125
Comments
That's true. That's one of the several corner cases where Lebab goes wrong. It's simply following heuristics, and these aren't 100% reliable. We could exclude these two patterns from the transform, but that would make the transform pretty useless - while I guess the best I can do is to link this issue from the main page, similarly to #107, to make people more aware of the potential pitfalls. |
Thinking a bit more over #125 I realized that Lebab really has two kinds of transforms - safe ones that could be applied almost blindly, and unsafe ones that should be carefully inspected. I further wanted to emphasize the recommended way of using lebab is to apply one transform at a time, so I completely removed the first code example that applies all the transforms.
Thanks for bringing this up. I've restructured README to emphasize which transforms are "safe" and which are "unsafe", like this |
Example:
But the transformed version:
This same issue also applies to the transform for
a = a ? a : 1
The text was updated successfully, but these errors were encountered: