Incorporate docstrings

MyClass

class example.MyClass(arg1)

This is a simple class.

This module illustrates three features of Sphinx:

  1. Pygments integration.
  2. Auto-doc features.
  3. Use of rst in docstrings.

Methods

    def another_method(self):
        """Returns something.
        """
        return self.arg1 * 2
MyClass.another_method()

Returns something.

    def method_with_arguments(self, a, b):
        """This method takes arguments.

        :param a: The first argument.
        :type a: int
        :param b: The second argument.
        :type b: str
        """
        return (self.arg1 * a) + b
MyClass.method_with_arguments(a, b)

This method takes arguments.

Parameters:
  • a (int) – The first argument.
  • b (str) – The second argument.

main()

example.main()