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

Use separate undefined object for else-less conditional expressions #1079

Merged
merged 2 commits into from
Oct 13, 2019

Conversation

ThiefMaster
Copy link
Member

fixes #710

jinja2/environment.py Outdated Show resolved Hide resolved
@davidism
Copy link
Member

Do we need this to be configurable? It seems like the contract of value if condition is that it returns Undefined, maybe it can just be that simple.

@ThiefMaster
Copy link
Member Author

That was my question ;) Then I'll change the default to use the undefined value if nothing is specified.

@ThiefMaster ThiefMaster force-pushed the cond-expr-undefined branch 2 times, most recently from 47bad3e to 28b848b Compare October 13, 2019 14:19
@ThiefMaster

This comment has been minimized.

@ThiefMaster
Copy link
Member Author

ThiefMaster commented Oct 13, 2019

oh, I think I misread your comment, i thought you mean that it's supposed to return the undefined object by default (which is whatever is configured in the env as undefined).

@davidism davidism added this to the 2.11.0 milestone Oct 13, 2019
@davidism davidism merged commit 8146e45 into pallets:master Oct 13, 2019
@ThiefMaster ThiefMaster deleted the cond-expr-undefined branch October 13, 2019 18:29
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

{{ 'foo' if false }} shortcut not usable with StrictUndefined
2 participants