From: Charles-Axel Dein Date: Sat, 15 Mar 2014 00:40:04 +0000 (-0700) Subject: Add is_ and isnot filter to the tutorial X-Git-Tag: rel_0_9_4~53^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fbfad42cb47fb4b13f2773a82c85e2d606386dbe;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Add is_ and isnot filter to the tutorial Most linter complain when comparing with None. --- diff --git a/doc/build/orm/tutorial.rst b/doc/build/orm/tutorial.rst index 96cedc973f..7fe43e200f 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_()