Message390598
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. |
|
Date |
User |
Action |
Args |
2021-04-09 08:48:19 | nschloe | set | recipients:
+ nschloe |
2021-04-09 08:48:19 | nschloe | set | messageid: <1617958099.53.0.277889313543.issue43786@roundup.psfhosted.org> |
2021-04-09 08:48:19 | nschloe | link | issue43786 messages |
2021-04-09 08:48:19 | nschloe | create | |
|