Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bbe9f3d commit 35b787cCopy full SHA for 35b787c
utils.py
@@ -606,3 +606,14 @@ def __delitem__(self, key):
606
for i, (value, item) in enumerate(self.A):
607
if item == key:
608
self.A.pop(i)
609
+
610
+# ______________________________________________________________________________
611
+# Useful Shorthands
612
613
614
+class Bool(int):
615
+ """Just like `bool`, except values display as 'T' and 'F' instead of 'True' and 'False'"""
616
+ __str__ = __repr__ = lambda self: 'T' if self else 'F'
617
618
+T = Bool(True)
619
+F = Bool(False)
0 commit comments