From: Mike Bayer Date: Tue, 24 Jul 2012 00:52:04 +0000 (-0400) Subject: - use "True" to indicate self-inspects, remove a lambda call X-Git-Tag: rel_0_8_0b1~304 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ec1762e6204a84207332cf1b2a0f0df4b5bc8937;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - use "True" to indicate self-inspects, remove a lambda call --- diff --git a/lib/sqlalchemy/inspection.py b/lib/sqlalchemy/inspection.py index 34a47217b2..f9c345dce5 100644 --- a/lib/sqlalchemy/inspection.py +++ b/lib/sqlalchemy/inspection.py @@ -56,6 +56,8 @@ def inspect(subject, raiseerr=True): for cls in type_.__mro__: if cls in _registrars: reg = _registrars[cls] + if reg is True: + return subject ret = reg(subject) if ret is not None: break @@ -83,4 +85,4 @@ def _inspects(*types): return decorate def _self_inspects(*types): - _inspects(*types)(lambda subject:subject) \ No newline at end of file + _inspects(*types)(True) \ No newline at end of file