Files
openide/python/testData/codeInsight/controlflow/Function.py
Mikhail Golubev 7c226889fc Preserve the capitalization in test data files of PyControlFlowBuilderTest
Previously, it used an odd convention with lowercased names of test data
files (with nothing separating individual words), which made adding new tests
quite tedious.

Also, I removed the test data "exit.py" as it wasn't used by any test.

GitOrigin-RevId: 92b1963c67ed01977f5b7ad020984056c9fe045d
2021-05-11 15:55:26 +00:00

14 lines
705 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
def help(object, spacing=foo, collapse=1):
"""Выводит методы и строки документации.
В качестве аргумента может использоваться модуль, класс, список, словарь
или строка."""
methodList = [method for method in dir(object) if callable(getattr(object, method))]
processFunc = collapse and (lambda s: " ".join(s.split())) or (lambda s: s)
print "\n".join(["%s %s" %
(method.ljust(spacing),
processFunc(str(getattr(object, method).__doc__)))
for method in methodList])
if __name__ == "__main__":
print help.__doc__