summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles-Axel Dein <ca@d3in.org>2014-03-14 17:40:04 -0700
committerCharles-Axel Dein <ca@d3in.org>2014-03-15 14:42:43 -0700
commitfbfad42cb47fb4b13f2773a82c85e2d606386dbe (patch)
treec30e50567d044f92d6af1fc7523e73d717688f9b
parent6d0f734a3da78d213da0931531bbcfc781521ca7 (diff)
downloadsqlalchemy-pr/80.tar.gz
Add is_ and isnot filter to the tutorialpr/80
Most linter complain when comparing with None.
-rw-r--r--doc/build/orm/tutorial.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/build/orm/tutorial.rst b/doc/build/orm/tutorial.rst
index 96cedc973..7fe43e200 100644
--- a/doc/build/orm/tutorial.rst
+++ b/doc/build/orm/tutorial.rst
@@ -773,10 +773,16 @@ Here's a rundown of some of the most common operators used in
query.filter(User.name == None)
+ # alternatively, if pep8/linters are a concern
+ query.filter(User.name.is_(None))
+
* IS NOT NULL::
query.filter(User.name != None)
+ # alternatively, if pep8/linters are a concern
+ query.filter(User.name.isnot(None))
+
* AND::
# use and_()