Commits

Anonymous committed c5005f7

Add is_ and isnot filter to the tutorial

Most linter complain when comparing with None.

Comments (0)

Files changed (1)

doc/build/orm/tutorial.rst

 
     filter(User.name == None)
 
+    # alternatively, if pep8/linters are a concern
+    query.filter(User.name.is_(None))
+
 * IS NOT NULL::
 
     filter(User.name != None)
 
+    # alternatively, if pep8/linters are a concern
+    query.filter(User.name.isnot(None))
+
 * AND::
 
     from sqlalchemy import and_