This is partly a test to see if I can reply in the correct format to a message in the tutor list (which I receive in digest format).
>Date: Thu, 02 Jul 2009 20:39:28 +1000 >From: Lie Ryan <lie.1...@gmail.com> > >Angus Rodgers wrote: >[...] >>>>> p = "green ideas" >>>>> q = "green ideas" >>>>> p == q >> True >>>>> p is q >> False >[...] >In this particular case, the reason is because "colourless" can be used >as an identifier. >[...] Identifiers cannot contain spaces, that's why green ideas are >not interned. That is very clear, thanks. Presumably a different optimisation is going on here: >>> "green ideas" is "green ideas" True [Does it create confusion to quote a dialogue with the interpreter in this way? The >>> looks like an instance of e-mail quotation.] >And... have I told you not to rely on this behavior? NEVER rely on this >implementation details. Once you get bitten by it, you'll regret it. Noted! -- Angus Rodgers _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor