New submission from halil ibrahim yıldırım <hyildi...@socialthinks.com>:

While id(a[:]) and id(a[0:3]) are the same however is comparison returns False. 
I thought it could be a bug.

>>> a = [1, 2, 3]
>>> id(a[:]) == id(a[0:3])
True
>>> a[:] is a[0:3]
False

----------
files: 2020-05-07_16-47-56-afa654f51735fad98b3a593a2ea539fd.png
messages: 368450
nosy: ihalil95
priority: normal
pull_requests: 19316
severity: normal
status: open
title: is comparison returns False while ids are the same.
type: behavior
versions: Python 3.8
Added file: 
https://bugs.python.org/file49143/2020-05-07_16-47-56-afa654f51735fad98b3a593a2ea539fd.png

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40565>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to