diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-01-20 15:36:40 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-01-20 15:36:40 -0500 |
commit | ee174e5acfe713d8b2394cad32ef672bd605b1f0 (patch) | |
tree | dad5aad774bea6adc481e0d381d19688da089046 /lib/sqlalchemy/ext/hybrid.py | |
parent | 79619c70e0cec3c9c210049679a7c0770bdcf56e (diff) | |
download | sqlalchemy-ee174e5acfe713d8b2394cad32ef672bd605b1f0.tar.gz |
and try that again.....
Diffstat (limited to 'lib/sqlalchemy/ext/hybrid.py')
-rw-r--r-- | lib/sqlalchemy/ext/hybrid.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/sqlalchemy/ext/hybrid.py b/lib/sqlalchemy/ext/hybrid.py index 4cf33ffa8..136d7d506 100644 --- a/lib/sqlalchemy/ext/hybrid.py +++ b/lib/sqlalchemy/ext/hybrid.py @@ -289,7 +289,6 @@ SQL function to both sides:: """ from sqlalchemy import util from sqlalchemy.orm import attributes, interfaces -types = __import__('types') class hybrid_method(object): """A decorator which allows definition of a Python object method with both @@ -320,9 +319,9 @@ class hybrid_method(object): def __get__(self, instance, owner): if instance is None: - return types.MethodType(self.expr, owner, owner.__class__) + return self.expr.__get__(owner, owner.__class__) else: - return types.MethodType(self.func, instance, owner) + return self.func.__get__(instance, owner) def expression(self, expr): """Provide a modifying decorator that defines a SQL-expression producing method.""" |