Skip to content
Permalink
Browse files

Monkey patch QPyNullVariant to be represented as 'NULL'

  • Loading branch information
m-kuhn committed Aug 28, 2013
1 parent 425b8b6 commit cba57fa55ac810a2fd01665c77740296a5866063
Showing with 4 additions and 0 deletions.
  1. +4 −0 python/__init__.py
@@ -43,6 +43,10 @@
def __nonzero__(self):
return False

def __repr__(self):
return 'NULL'

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

0 comments on commit cba57fa

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