Return an empty string rather than None when calling repr()
Repr() should return "a string containing a printable representation of an object," which is a convention Sphinx 1.2 relies on when building the docs. Fixes bug 1163369 Change-Id: Ieefd69c5b4b521500679df7745f60cb3a4d2f77c
This commit is contained in:
parent
c38b989c53
commit
29cb3251af
@ -40,7 +40,7 @@ class memoized(object):
|
||||
|
||||
def __repr__(self):
|
||||
'''Return the function's docstring.'''
|
||||
return self.func.__doc__
|
||||
return self.func.__doc__ or ''
|
||||
|
||||
def __get__(self, obj, objtype):
|
||||
'''Support instance methods.'''
|
||||
|
Loading…
x
Reference in New Issue
Block a user