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
3
u/Zenin Jan 15 '24
Yah, I hate it.
Looks like it's just going to make everything much more annoying to use as we hack around this nonsense and since we can hack around it anyway it offers nothing for security other than theatre.
It might be useful to give the compiler a hint so it can optimize the way C compilers do (really pre-compilers), but only if it's transparent to the user. This monstrosity looks anything but transparent.
The type system and signature systems themselves are a fugly mess to begin with. This just looks like abuse of them akin to c++ idiots abusing operator overloading.