Skip to content
Permalink
Browse files

Fix python indentation

  • Loading branch information
NathanW2 committed Jun 11, 2013
1 parent 0fd5fd1 commit 21aecd532ca69215d51600319039ba1223423453
Showing with 6 additions and 7 deletions.
  1. +6 −7 python/__init__.py
@@ -24,16 +24,15 @@
__revision__ = '$Format:%H$'

try:
# Add a __nonzero__ method onto QPyNullVariant so we can check for null values easier.
# >>> value = QPyNullVariant("int")
# >>> if value:
# >>> print "Not a null value"
from types import MethodType
from PyQt4.QtCore import QPyNullVariant
# Add a __nonzero__ method onto QPyNullVariant so we can check for null values easier.
# >>> value = QPyNullVariant("int")
# >>> if value:
# >>> print "Not a null value"
from types import MethodType
from PyQt4.QtCore import QPyNullVariant
def __nonzero__(self):
return False

QPyNullVariant.__nonzero__ = MethodType(__nonzero__, None, QPyNullVariant)
except ImportError:
pass

0 comments on commit 21aecd5

Please sign in to comment.
You can’t perform that action at this time.