Skip to content

Commit 74a3c2a

Browse files
committed
use equality, not identity
Integer identity for small integers works in CPython, but isn't guaranteed in other interpreters.
1 parent 42000c2 commit 74a3c2a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cassandra/cluster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4303,7 +4303,7 @@ def __eq__(self, other):
43034303
return self._current_rows == other
43044304

43054305
def __getitem__(self, i):
4306-
if i is 0:
4306+
if i == 0:
43074307
warn("ResultSet indexing support will be removed in 4.0. Consider using "
43084308
"ResultSet.one() to get a single row.", DeprecationWarning)
43094309
self._enter_list_mode("index operator")

0 commit comments

Comments
 (0)