documentation

How can I reference a class from a specific documentation with Intersphinx?

How can I reference a class from a specific documentation with Intersphinx? Question: I have set up an Intersphinx-mapping for the documentations of Python 2 and Python 3: intersphinx_mapping = {‘py2’: (‘http://docs.python.org/’, None), ‘py3’: (‘http://docs.python.org/3’, None)} How can I reference a class from a specific of these two resources? The documentation only mentions :ref:erences and …

Total answers: 2

How to properly write cross-references to external documentation with intersphinx?

How to properly write cross-references to external documentation with intersphinx? Question: I’m trying to add cross-references to external API into my documentation but I’m facing three different behaviors. I am using sphinx(1.3.1) with Python(2.7.3) and my intersphinx mapping is configured as: { ‘python’: (‘https://docs.python.org/2.7’, None), ‘numpy’: (‘http://docs.scipy.org/doc/numpy/’, None), ‘cv2’ : (‘http://docs.opencv.org/2.4/’, None), ‘h5py’ : (‘http://docs.h5py.org/en/latest/’, …

Total answers: 7

Documentation for pip the python package (rather than the command line tool)

Documentation for pip the python package (rather than the command line tool) Question: When you install pip, you get a Python package as well as a command line tool. For example, you can print a list of Python packages like this: import pip print pip.get_installed_distributions() However I can’t find any documentation for this package. Searching …

Total answers: 1

pandas resample documentation

pandas resample documentation Question: So I completely understand how to use resample, but the documentation does not do a good job explaining the options. So most options in the resample function are pretty straight forward except for these two: rule : the offset string or object representing target conversion how : string, method for down- …

Total answers: 3

What's the difference on docstrings with triple SINGLE quotes and triple DOUBLE quotes?

What's the difference on docstrings with triple SINGLE quotes and triple DOUBLE quotes? Question: I was just wondering what is the difference between two ways of writing Python Docstrings (__doc__): three single quotes: ”’ Comment goes here ”’ three double quotes: “”” Comment goes here “”” Is there any subtle difference in the way doc …

Total answers: 4

How do I create documentation with Pydoc?

How do I create documentation with Pydoc? Question: I’m trying to create a document out of my module. I used pydoc from the command-line in Windows 7 using Python 3.2.3: python “<path_to_pydoc_>pydoc.py” -w myModule This led to my shell being filled with text, one line for each file in my module, saying: no Python documentation …

Total answers: 4

How to document a method with parameter(s)?

How to document a method with parameter(s)? Question: How to document methods with parameters using Python’s documentation strings? EDIT: PEP 257 gives this example: def complex(real=0.0, imag=0.0): “””Form a complex number. Keyword arguments: real — the real part (default 0.0) imag — the imaginary part (default 0.0) “”” if imag == 0.0 and real == …

Total answers: 9

How do I create multiline comments in Python?

How do I create multiline comments in Python? Question: How do I make multi-line comments? Most languages have block comment symbols like: /* */ Asked By: Dungeon Hunter || Source Answers: I think it doesn’t, except that a multiline string isn’t processed. However, most, if not all Python IDEs have a shortkey for ‘commenting out’ …

Total answers: 27

Are docstrings for internal functions (python) necessary?

Are docstrings for internal functions (python) necessary? Question: In python we designate internal function/ private methonds with an underscore at the beginning. Should these functions be documented with docstrings(is it required?)? (the formal documentation i mean, not the one helping the code-reader to understand the code) What is common practice for this? Asked By: 0xc0de …

Total answers: 1