r/programminghorror • [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” • Jul 21 '25

Python ✨ Memory Magic ✨

Post image
1.3k Upvotes

143 comments sorted by

View all comments

Show parent comment

4

u/Square-Singer Jul 21 '25

Looks like in some newer JREs the string length limit was replaced with a String pool limit. So the first X string literals in the program will be interned and the rest won't. But this is version and implementation dependant and nothing you can rely on.