Skip to content
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

Added argument splatting support #642

Merged
merged 6 commits into from
Nov 10, 2024
Merged

Added argument splatting support #642

merged 6 commits into from
Nov 10, 2024

Conversation

mitsuhiko
Copy link
Owner

@mitsuhiko mitsuhiko commented Nov 10, 2024

Unlike Jinja2, MiniJinja did not support splatting. You can now call functions with *args and **kwargs.

{{ f(1, 2, *[3, 4], *[5, 6]) }}
{{ f(1, 2, *[3, 4], *[5, 6], seven=8, **{"nine": 10), **dict(eleven=12) }}

This also fixes a bug where maps were sometimes created in reverse order.

@mitsuhiko mitsuhiko merged commit 3885d10 into main Nov 10, 2024
33 checks passed
@mitsuhiko mitsuhiko deleted the feature/splat branch November 10, 2024 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant