Skip to content

Conversation

Neradoc
Copy link
Contributor

@Neradoc Neradoc commented Jun 14, 2022

In CP 7.3.0 there are some language fixes to previous syntax errors in f-strings (from MP18).
A string like this would not compile prior to 7.3.0:

string = "123456789"
print(f"{string[2:6]}")

Note that an MPY file with that code generated with mpy-cross 7.3.0 runs properly on 7.0.0 according to my tests.

In Micropython 18 (and CP 7.3.0) there are some language fixes to previous syntax errors in f-strings, and maybe others.
A string like this would not compile prior to 7.3.0:
```py
string = "123456789"
print(f"{string[2:6]}")
```
Note that an MPY file with that code generated with mpy-cross 7.3.0 runs properly on 7.0.0 according to my tests.
Copy link
Contributor

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

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

Great! Thanks!

@dhalbert dhalbert merged commit 8c66f80 into adafruit:main Jun 14, 2022
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