HN2new | past | comments | ask | show | jobs | submitlogin

I don't think this is actually a security concern. The only place f-strings are evaluated is where they're directly included in the source; they can't be supplied by a user (unless you're using "eval," in which case the security concern applies with or without f-strings). As the PEP says:

"Because the f-strings are evaluated where the string appears in the source code, there is no additional expressiveness available with f-strings. There are also no additional security concerns: you could have also just written the same expression, not inside of an f-string."



Should have read the PEP in full. Thanks : )




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: