▲ | illegally 8 days ago | ||||||||||||||||||||||||||||||||||||||||
Feels unnecessary... Can't think of a good reason now on why I would need this rather than just a simple f-string. Any unsafe string input should normally be sanitized before being added in a template/concatenation, leaving the sanitization in the end doesn't seem like the best approach, but ok. | |||||||||||||||||||||||||||||||||||||||||
▲ | stavros 8 days ago | parent [-] | ||||||||||||||||||||||||||||||||||||||||
Yeah, I generally like most of the stuff that goes into Python, but I have to admit I can't really see the usefulness in this (or, at least, enough usefulness to warrant making it standard). One of the PEP's developers, Lysandros, presented this in our local meetup, so I am passingly familiar with it, but still, I might be missing something. I guess the crux of it is that I don't understand why it's `t"some string"` instead of `Template("some string")`. What do we gain by the shorthand? | |||||||||||||||||||||||||||||||||||||||||
|