summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-07-29 02:13:29 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-07-29 02:13:29 +0000
commit45650694ee3e3d52b96e6c30e1b3176688ad5210 (patch)
tree4844e3e25d2ac2e32d023dd7105b59108a94bf72 /lib/sqlalchemy/sql.py
parent82515ea2fcd54c15f24a9b8f479801b33097d49f (diff)
downloadsqlalchemy-45650694ee3e3d52b96e6c30e1b3176688ad5210.tar.gz
fixed pydoc bug in [ticket:564]
Diffstat (limited to 'lib/sqlalchemy/sql.py')
-rw-r--r--lib/sqlalchemy/sql.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql.py b/lib/sqlalchemy/sql.py
index ff92f0b43..0cc7d11ed 100644
--- a/lib/sqlalchemy/sql.py
+++ b/lib/sqlalchemy/sql.py
@@ -732,7 +732,14 @@ class _FunctionGenerator(object):
self.opts = opts
def __getattr__(self, name):
- if name[-1] == '_':
+ # passthru __ attributes; fixes pydoc
+ if name.startswith('__'):
+ try:
+ return self.__dict__[name]
+ except KeyError:
+ raise AttributeError(name)
+
+ elif name.startswith('_'):
name = name[0:-1]
f = _FunctionGenerator(**self.opts)
f.__names = list(self.__names) + [name]