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 nschloe
Recipients nschloe
Date 2021-04-09.08:48:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1617958099.53.0.277889313543.issue43786@roundup.psfhosted.org>
In-reply-to
Content
I stumbled upon this when dealing with NumPy arrays:
```
slice(None) is slice(None)
```
```
False
```
This came up when trying to check if a variable `a` equals `slice(None)`. The comparison
```
a = slice(None)
a == slice(None)
```
```
True
```
works, but doesn't return a single Boolean if a is a NumPy array, for example.

Perhaps there's another way of finding out if a variable is exactly `slice(None)`, but the failure of `is` seems like a bug.
History
Date User Action Args
2021-04-09 08:48:19nschloesetrecipients: + nschloe
2021-04-09 08:48:19nschloesetmessageid: <1617958099.53.0.277889313543.issue43786@roundup.psfhosted.org>
2021-04-09 08:48:19nschloelinkissue43786 messages
2021-04-09 08:48:19nschloecreate