Skip to content

Instantly share code, notes, and snippets.

@chalggg
chalggg / boolean_list_indexing_220220418.patch
Created April 18, 2022 18:19
Adding list indexing with list of booleans to pure Python
diff --git a/Lib/test/test_list.py b/Lib/test/test_list.py
index d3da05ba84..6e640decc1 100644
--- a/Lib/test/test_list.py
+++ b/Lib/test/test_list.py
@@ -256,6 +256,39 @@ def __eq__(self, other):
lst = [X(), X()]
X() in lst
+ def test_indexing_with_boolean_list_ok(self):
+ a=[1,2,3,4]