reStructuredText in Sphinx and Docstrings: single vs. double back-quotes or back-ticks difference

From the Sphinx documentation:

The default role (`content`) has no special meaning by default. You are free to use it for anything you like, e.g. variable names; use the default_role config value to set it to a known role.

As a matter of personal preference, when writing Python docstrings, I use interpreted text (single backquotes) for Python names and dotted paths, whether or not they are in scope at the location of the docstring. So in your case I would put arg1, arg2, NiceClass, B and B.something all in single backquotes, optionally adding the appropriate :class:, :mod: etc. roles.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)