]> granicus.if.org Git - python/commitdiff
bpo-37342: Fix the incorrect nb_index's type in typeobj documentation (GH-14241)
authorHai Shi <shihai1992@gmail.com>
Thu, 20 Jun 2019 03:32:24 +0000 (22:32 -0500)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 20 Jun 2019 03:32:23 +0000 (20:32 -0700)
It was listed as `binaryfunc`. It should be `unaryfunc`.

Doc/c-api/typeobj.rst

index 83fcc5abed707963af1798540079ed57bfe3c901..638fb0c32d788bc720c17cc70f9bd8514673eb0e 100644 (file)
@@ -285,7 +285,7 @@ sub-slots
    +---------------------------------------------------------+-----------------------------------+--------------+
    | :c:member:`~PyNumberMethods.nb_inplace_true_divide`     | :c:type:`binaryfunc`              | __truediv__  |
    +---------------------------------------------------------+-----------------------------------+--------------+
-   | :c:member:`~PyNumberMethods.nb_index`                   | :c:type:`binaryfunc`              | __index__    |
+   | :c:member:`~PyNumberMethods.nb_index`                   | :c:type:`unaryfunc`               | __index__    |
    +---------------------------------------------------------+-----------------------------------+--------------+
    | :c:member:`~PyNumberMethods.nb_matrix_multiply`         | :c:type:`binaryfunc`              | __matmul__   |
    |                                                         |                                   | __rmatmul__  |