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_8_6~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c5005f7e4b11053d8d38ef1dd34fd47b42af0cd0;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 afbf05734a..9dd27c322d 100644 --- a/doc/build/orm/tutorial.rst +++ b/doc/build/orm/tutorial.rst @@ -790,10 +790,16 @@ Here's a rundown of some of the most common operators used in :func:`~sqlalchemy 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_