class A:
def m(self):
'line1' \
'line2' \
'line3'
print(1)
a = A()
a.m()
print(a.m.__doc__)
Просто консоль запусти и туда скопируй код.
class A:
def m(self):
'line1' \
'line2' \
'line3'
print(1)
a = A()
a.m()
print(a.m.__doc__)
def fix_doc_strings(cls):
for name, method in cls.__dict__.iteritems():
if callable(method):
doc_str = " ".join(map(str.strip, method.__doc__.splitlines()))
method.__doc__ = doc_str
return cls