| 9 |
|
Takes module, class, list, dictionary, or string.""" |
| 10 |
|
methodList = [method for method in dir(object) if callable(getattr(object, method))] |
| 11 |
|
processFunc = collapse and (lambda s: " ".join(s.split())) or (lambda s: s) |
| 12 |
< |
print "\n".join(["%s %s" % |
| 12 |
> |
print("\n".join(["%s %s" % |
| 13 |
|
(method.ljust(spacing), |
| 14 |
|
processFunc(str(getattr(object, method).__doc__))) |
| 15 |
< |
for method in methodList]) |
| 15 |
> |
for method in methodList])) |
| 16 |
|
if __name__ == "__main__": |
| 17 |
< |
print help.__doc__ |
| 17 |
> |
print(help.__doc__) |