News for hackers. Stuff that matters.
Re:WTFPython: Exploring and understanding Python through sur... by masklinn on Tuesday May 31, 2022 @03:23PM (#31573733)
Beware that your method of construction is risky to your demonstration: the python compiler does do some limited optimisations, and trivial constant folding is one of them.

If you test at the shell it apparently misses it (though it works for smaller strings e.g. "abc" / "a" + "b" + "c"), but if you put the same thing in a file and run it, it'll tell you the two strings are identical.

There are no comments on this comment yet.