[issue36163] same object, same method, but the is keyword return false.

lgj report at bugs.python.org
Fri Mar 1 21:16:43 EST 2019


New submission from lgj <929102624 at qq.com>:

>>> class A():
...   def a(self):
...       pass
...
>>> a = A()
>>> a is a
True
>>> a.a is a.a
False
>>> id(a.a)
4532803784
>>> id(a.a)
4532803784
It's seems quite oops.

----------
messages: 336979
nosy: lgj1993
priority: normal
severity: normal
status: open
title: same object, same method, but the is keyword return false.
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36163>
_______________________________________


More information about the Python-bugs-list mailing list