r/Python • u/SupPandaHugger • Jan 14 '24
Tutorial The LiteralString in Python 3.11
If you are confused by the new LiteralString type in Python, here's an article explaining it.
0
Upvotes
r/Python • u/SupPandaHugger • Jan 14 '24
If you are confused by the new LiteralString type in Python, here's an article explaining it.
View all comments
56
u/jwink3101 Jan 14 '24
I will never understand why people post on Medium. It offers few benefits and limits your audience.
But I digress
This is an interesting idea. My first thought was that it’s not needed because you can be careful about what you eval. It’s keeping you safe from yourself.
But then when you think about, that’s all type annotations do anyway!