If you have set up intersphinx, the following markup will produce a hyperlink to the specified target in the Python documentation with the link text __enter__
:
:meth:`__enter__ <object.__enter__>`
An alternative:
:meth:`~.object.__enter__`
This will result in the link text __enter__()
(with parentheses by default; see http://sphinx-doc.org/config.html#confval-add_function_parentheses).
Or just use this:
`__enter__ <http://docs.python.org/2.7/reference/datamodel.html#object.__enter__>`_
See http://sphinx-doc.org/markup/inline.html#cross-referencing-syntax and http://sphinx-doc.org/rest.html#hyperlinks.