[pygobject] Copy __doc__ when wrapping function
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Copy __doc__ when wrapping function
- Date: Thu, 5 Sep 2013 04:41:19 +0000 (UTC)
commit afa42ab95327da1de0cf86005974cd8ab0d46872
Author: Vratislav Podzimek <vpodzime redhat com>
Date: Wed Sep 4 14:17:31 2013 +0200
Copy __doc__ when wrapping function
Signed-off-by: Vratislav Podzimek <vpodzime redhat com>
Signed-off-by: Martin Pitt <martinpitt gnome org>
gi/overrides/__init__.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gi/overrides/__init__.py b/gi/overrides/__init__.py
index 943ea60..8aa9731 100644
--- a/gi/overrides/__init__.py
+++ b/gi/overrides/__init__.py
@@ -64,6 +64,7 @@ class overridefunc(object):
def wrapper(*args, **kwargs):
return func(*args, **kwargs)
wrapper.__name__ = func.__name__
+ wrapper.__doc__ = func.__doc__
setattr(self.module, func.__name__, wrapper)
return wrapper
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]