]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Copy __name__ and __doc__ from oldinit.
authorsean <none@none>
Tue, 6 Jun 2006 04:44:39 +0000 (04:44 +0000)
committersean <none@none>
Tue, 6 Jun 2006 04:44:39 +0000 (04:44 +0000)
lib/sqlalchemy/orm/mapper.py

index 64889b9a667cfd8c040104b1772c736f6d9038cf..3ce7d9a807b653b445f7bc23c6f69cb07848f4ad 100644 (file)
@@ -417,6 +417,8 @@ class Mapper(object):
         # override oldinit, insuring that its not already a Mapper-decorated init method
         if oldinit is None or not hasattr(oldinit, '_sa_mapper_init'):
             init._sa_mapper_init = True
+            init.__name__ = oldinit.__name__
+            init.__doc__ = oldinit.__doc__
             self.class_.__init__ = init
         mapper_registry[self.class_key] = self
         if self.entity_name is None: