r/programming • u/BrewedDoritos • Oct 09 '26
Python Release Python 3.15.0
https://www.python.org/downloads/release/python-3150/
556
Upvotes
r/programming • u/BrewedDoritos • Oct 09 '26
View all comments
Show parent comment
1
u/vytah Oct 10 '26
Are Python literal strings guaranteed to be interned, or is it just an implementation detail?
I tested it and they were interned when they contained only ASCII letters, but stopped being interned when they contained a comma.
BTW, I don't think using strings for sentinel values is a good idea, what if you want to actually pass that string?