We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 7e11384 commit ced7c27Copy full SHA for ced7c27
python/PyQt/PyQt5/QtCore.py
@@ -8,11 +8,8 @@
8
_QVariant__hash__ = QVariant.__hash__
9
10
11
-def __nonzero__(self):
12
- if self.isNull():
13
- return False
14
- else:
15
- return True
+def __bool__(self):
+ return not self.isNull()
16
17
18
def __repr__(self):
@@ -42,7 +39,7 @@ def __hash__(self):
42
39
else:
43
40
return _QVariant__hash__(self)
44
41
45
-QVariant.__nonzero__ = __nonzero__
+QVariant.__bool__ = __bool__
46
QVariant.__repr__ = __repr__
47
QVariant.__eq__ = __eq__
48
QVariant.__ne__ = __ne__
0 commit comments