Disallow f(x, y=1, z) and similar nonsense
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Python rejects such function definitions because it doesn't make much sense to have arguments with no default values after arguments with default values. Jinja did allow them, but handled them improperly (associating the default value with the wrong argument). Due to how broken the current behavior is, it makes more sense to reject templates containing such defintions instead of trying to handle them properly. Both cases are going to break existing code containing such definitions, but besides the fact that possibly no such code exists it is better to fail with a clear error than to silently change the values of arguments. This fixes #364
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
3 files+15 added−0 removed
- other:+15 added−0 removed