]> granicus.if.org Git - python/commitdiff
bpo-31567: add or fix decorator markup in docs (#3959)
authorDaisuke Miyakawa <d.miyakawa@gmail.com>
Thu, 12 Oct 2017 14:39:43 +0000 (23:39 +0900)
committerÉric Araujo <merwok@users.noreply.github.com>
Thu, 12 Oct 2017 14:39:43 +0000 (10:39 -0400)
Doc/library/abc.rst
Doc/library/functions.rst
Doc/library/functools.rst
Doc/library/test.rst

index 6001db32df49c3b7dba692db63cb66c9457c8347..9522dd62049138b5e809e61e0f16c7f7f3a7554c 100644 (file)
@@ -278,7 +278,7 @@ The :mod:`abc` module also provides the following decorators:
        :func:`abstractmethod`, making this decorator redundant.
 
 
-.. decorator:: abstractproperty(fget=None, fset=None, fdel=None, doc=None)
+.. decorator:: abstractproperty
 
    A subclass of the built-in :func:`property`, indicating an abstract
    property.
index 08093e61fe527d7d9691ec03cb2a1a06b4c13491..eed67301c0497392f58edb69f228870d1b5e1509 100644 (file)
@@ -196,9 +196,9 @@ are always available.  They are listed here in alphabetical order.
    base 16).  :exc:`ValueError` will be raised if *i* is outside that range.
 
 
-.. function:: classmethod(function)
+.. decorator:: classmethod
 
-   Return a class method for *function*.
+   Transform a method into a class method.
 
    A class method receives the class as implicit first argument, just like an
    instance method receives the instance. To declare a class method, use this
@@ -1398,9 +1398,9 @@ are always available.  They are listed here in alphabetical order.
 
    For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`.
 
-.. function:: staticmethod(function)
+.. decorator:: staticmethod
 
-   Return a static method for *function*.
+   Transform a method into a static method.
 
    A static method does not receive an implicit first argument. To declare a static
    method, use this idiom::
index 9a8defee546bf3a9b3084ed736e4c83dc3a6833d..28062c11890ed10304a4ede90a0a1452180dda11 100644 (file)
@@ -264,9 +264,9 @@ The :mod:`functools` module defines the following functions:
           return value
 
 
-.. decorator:: singledispatch(default)
+.. decorator:: singledispatch
 
-   Transforms a function into a :term:`single-dispatch <single
+   Transform a function into a :term:`single-dispatch <single
    dispatch>` :term:`generic function`.
 
    To define a generic function, decorate it with the ``@singledispatch``
index 33978e331b62fef52f824cd08bd13ca790d95234..01ba1ec7062c98ada96381d8dac7f4acb7205491 100644 (file)
@@ -440,7 +440,7 @@ The :mod:`test.support` module defines the following functions:
    otherwise.
 
 
-.. decorator:: skip_unless_symlink()
+.. decorator:: skip_unless_symlink
 
    A decorator for running tests that require support for symbolic links.