[Python-Dev] About .append == .append
On Fri, Jun 22, 2018 at 11:44:07AM -0700, Guido van Rossum wrote:
> > I know why it happens -- at the REPL, the interpreter uses the same
> > object for both 17.1 instances when they're part of the same statement,
> > but not when they're on separate lines. I just don't know whether this
> > is desirable or not.
> But there's nothing new about that example. It's just the same as the issue
> that sometimes `1 is 1` and sometimes it isn't.
Sure, but this is closer to "sometimes 1 == 1 and sometimes it isn't".
But if you're okay with it, I don't have a counter-argument.
I think it is more important that builtin methods and Python methods
behave the same. Should Python methods be changed to compare self with
"is" or are we too late to make that change?