I am trying to make a docstring that will accept replacement fields as follows def run_tests(args): """run tests on methods in {0} usage: {0} --tests """.format(__file__) pass but when I run help(run_tests) in the interpreter, I do not get the docstring. If I remove {} and .format() the docstring returns as expected. I would like to see the output something like: Help on function run_tests in module myfile: run_tests(args) runs tests on methods in myfile.py usage: myfile.py --tests Is there a way to do this in Python 3? Continue reading...