Jonathan Davis wrote: <snip>
You can always check with the is operator though. If it reports true, then the two strings have the same instance. If it reports false, then they don't.
I can't see how testing each string literal to see if it's the same instance as another can work.
The OP's point is: Are identical string literals *guaranteed* to be the same instance? Regardless of implementation? Regardless of whether they're next to each other, in different modules or anything in between? Regardless of the phase of the moon?
Stewart.