Skip to content

Conversation

@johnmai-dev
Copy link
Collaborator

Swift

Xcode 2025-09-26 13 13 48 Xcode 2025-09-26 13 13 24

Python

template = env.from_string("{{ 4.5 is even }}")
result = template.render()
print(f"  4.5 is even: {result}")

template = env.from_string("{{ 4.5 is odd }}")
result = template.render()
print(f"  4.5 is odd: {result}")

template = env.from_string("{{ 3.7 is even }}")
result = template.render()
print(f"  3.7 is even: {result}")

template = env.from_string("{{ 3.7 is odd }}")
result = template.render()
print(f"  3.7 is odd: {result}")

template = env.from_string("{{ 0.1 is even }}")
result = template.render()
print(f"  0.1 is even: {result}")

template = env.from_string("{{ 0.1 is odd }}")
result = template.render()
print(f"  0.1 is odd: {result}")
4.5 is even: False
4.5 is odd: False
3.7 is even: False
3.7 is odd: False
0.1 is even: False
0.1 is odd: False

@johnmai-dev johnmai-dev requested a review from mattt September 26, 2025 05:23
Copy link
Collaborator

@mattt mattt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this, @johnmai-dev!

@mattt mattt merged commit 62b9128 into huggingface:main Sep 26, 2025
2 checks passed
@mattt
Copy link
Collaborator

mattt commented Sep 26, 2025

This is now in 2.0.2.

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.

2 participants