From the documentation, it appears that the double back-quote is used for literals, while the single back-quote is used when there is code text to be intepreted.
This would lead me to to write the docstring for method f()
below:
class A(B):
def f(arg1, arg2):
return B(arg1 + arg2 + self.index)
As:
Takes two arguments, ``arg1` and ``arg2``, which are assumed to be objects
of type (or duck-type) `NiceClass`, and returns a new object of class `B`
with `B.something` assigned some hash of ``arg1`` and ``arg2``.
Would this be correct?
In many code examples, Sphinx and otherwise, I see the equivalent of B
and NiceClass
wrapped in double back-quotes ("``B``" and "``NiceClass``").