]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Correcting the Hybrid Property Example
authorJason Myers <jason@jasonamyers.com>
Thu, 10 Sep 2015 13:23:54 +0000 (08:23 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 10 Sep 2015 13:37:29 +0000 (09:37 -0400)
Fixes #3528

Signed-off-by: Jason Myers <jason@jasonamyers.com>
Conflicts:
lib/sqlalchemy/ext/hybrid.py

lib/sqlalchemy/ext/hybrid.py

index 595e81468d4af004d394497bcd307e560a620bef..3e4503505004cc2c3c1721657a971a275689ce4b 100644 (file)
@@ -45,8 +45,8 @@ as the class itself::
             return self.end - self.start
 
         @hybrid_method
-        def contains(self,point):
-            return (self.start <= point) & (point < self.end)
+        def contains(self, point):
+            return (self.start <= point) & (point <= self.end)
 
         @hybrid_method
         def intersects(self, other):