From c891fdfc60eda7b70240cbd2552def35e2305600 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 12 Jun 2010 11:37:56 +0200 Subject: [PATCH] Document new :py:func:`.blah` syntax. --- doc/domains.rst | 7 +++++++ doc/intro.rst | 3 --- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/domains.rst b/doc/domains.rst index 0cc0087a7..c64930a24 100644 --- a/doc/domains.rst +++ b/doc/domains.rst @@ -363,6 +363,13 @@ dot, this order is reversed. For example, in the documentation of Python's :mod:`codecs` module, ``:py:func:`open``` always refers to the built-in function, while ``:py:func:`.open``` refers to :func:`codecs.open`. +Also, if the name is prefixed with a dot, and no exact match is found, the +target is taken as a suffix and all object names with that suffix are +searched. For example, ``:py:meth:`.TarFile.close``` references the +``tarfile.TarFile.close()`` function, even if the current module is not +``tarfile``. Since this can get ambiguous, if there is more than one possible +match, you will get a warning from Sphinx. + A similar heuristic is used to determine whether the name is an attribute of the currently documented class. diff --git a/doc/intro.rst b/doc/intro.rst index 33a89fa6e..33f97a3f8 100644 --- a/doc/intro.rst +++ b/doc/intro.rst @@ -16,9 +16,6 @@ Though there is support for that kind of docs as well (which is intended to be freely mixed with hand-written content), if you need pure API docs have a look at `Epydoc `_, which also understands reST. -.. function:: Sphinxy.add_domain() - -:func:`.add_domain` Conversion from other systems -----------------------------