]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
force __doc__ to transfer over from the decorated funciton.
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 5 Jul 2010 21:17:34 +0000 (17:17 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 5 Jul 2010 21:17:34 +0000 (17:17 -0400)
2.6 does this anyway, 2.4 and 2.5 do not.

lib/sqlalchemy/util.py

index bcd341750b0438c546b0f75bb16d12a13e82f316..efbb4c653721a07999e8fcab470e2f45b8c59518 100644 (file)
@@ -1699,6 +1699,11 @@ class classproperty(property):
 
     This is helpful when you need to compute __table_args__ and/or
     __mapper_args__ when using declarative."""
+    
+    def __init__(self, fget, *arg, **kw):
+        super(classproperty, self).__init__(fget, *arg, **kw)
+        self.__doc__ = fget.__doc__
+        
     def __get__(desc, self, cls):
         return desc.fget(cls)