Skip to content

Berry f-strings now support ':' in expression#23618

Merged
s-hadinger merged 1 commit into
arendst:developmentfrom
s-hadinger:berry_f_strings_colon
Jun 29, 2025
Merged

Berry f-strings now support ':' in expression#23618
s-hadinger merged 1 commit into
arendst:developmentfrom
s-hadinger:berry_f_strings_colon

Conversation

@s-hadinger
Copy link
Copy Markdown
Collaborator

@s-hadinger s-hadinger commented Jun 29, 2025

Description:

Berry, now f-strings supports ':' in expression, if double as '::'.

Example:

var is_on = true
var s = f"status = {is_on ? 'on' :: 'off'}"
# s is 'status = on'

f"status = {is_on ? 'on' :: 'off'}" is equivalent to format("status = %s", is_on ? 'on' : 'off')

Checklist:

  • The pull request is done against the latest development branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works with Tasmota core ESP8266 V.2.7.8
  • The code change is tested and works with Tasmota core ESP32 V.3.1.3.250504
  • I accept the CLA.

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

@s-hadinger s-hadinger merged commit 45dd2a3 into arendst:development Jun 29, 2025
60 checks passed
echo-bravo-yahoo pushed a commit to echo-bravo-yahoo/Tasmota that referenced this pull request Jan 9, 2026
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