This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author collinwinter
Recipients alex, collinwinter, loewis, rhettinger, terry.reedy
Date 2009-05-30.00:04:39
SpamBayes Score 0.0061287894
Marked as misclassified No
Message-id <43aa6ff70905291704p2a1c655cia472d7149f8913f7@mail.gmail.com>
In-reply-to <4A20658F.30305@v.loewis.de>
Content
On Fri, May 29, 2009 at 3:45 PM, Martin v. Löwis <report@bugs.python.org> wrote:
> py> s = ""
> py> s.join is s.join
> False
>
> Every time you read it, you get a new object. Not what I would call a
> constant. If you don't see how this matters, try
>
> def foo():
>  return "".join
>
> print foo() is foo()
>
> with and without your patch.

The fact that it returns a new object every time seems like an
implementation detail, and one that users find confusing (I know I
once filed a bug about it).

One problem I recognize is that the proposed patch would presumably
create an asymmetry between "x".join is "x".join and "x = 'x'; x.join
is x.join" where the former would evaluate to True and the latter to
False. That seems surmountable, though.
History
Date User Action Args
2009-05-30 00:04:43collinwintersetrecipients: + collinwinter, loewis, rhettinger, terry.reedy, alex
2009-05-30 00:04:41collinwinterlinkissue6133 messages
2009-05-30 00:04:39collinwintercreate