We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1433f3c commit 4db6396Copy full SHA for 4db6396
python/__init__.py
@@ -49,9 +49,13 @@ def __repr__(self):
49
def __eq__(self, other):
50
return isinstance(other, QPyNullVariant) or other is None
51
52
+ def __ne__(self, other):
53
+ return not isinstance(other, QPyNullVariant) and other is not None
54
+
55
QPyNullVariant.__nonzero__ = MethodType(__nonzero__, None, QPyNullVariant)
56
QPyNullVariant.__repr__ = MethodType(__repr__, None, QPyNullVariant)
57
QPyNullVariant.__eq__= MethodType(__eq__, None, QPyNullVariant)
58
+ QPyNullVariant.__ne__= MethodType(__ne__, None, QPyNullVariant)
59
60
# define a dummy QPyNullVariant instance NULL in qgis.core
61
# this is mainly used to compare against
0 commit comments