From: Andre Delfino Date: Mon, 8 Apr 2019 09:14:43 +0000 (-0300) Subject: Correct "inplace" with "in-place" (GH-10480) X-Git-Tag: v3.8.0a4~249 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f4efa312d14bc792f59514c5696e29041e05deca;p=python Correct "inplace" with "in-place" (GH-10480) --- diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst index f36cfe551e..0647a49330 100644 --- a/Doc/c-api/typeobj.rst +++ b/Doc/c-api/typeobj.rst @@ -2052,7 +2052,7 @@ Sequence Object Structures signature. It should modify its first operand, and return it. This slot may be left to *NULL*, in this case :c:func:`!PySequence_InPlaceConcat` will fall back to :c:func:`PySequence_Concat`. It is also used by the - augmented assignment ``+=``, after trying numeric inplace addition + augmented assignment ``+=``, after trying numeric in-place addition via the :c:member:`~PyNumberMethods.nb_inplace_add` slot. .. c:member:: ssizeargfunc PySequenceMethods.sq_inplace_repeat @@ -2061,7 +2061,7 @@ Sequence Object Structures signature. It should modify its first operand, and return it. This slot may be left to *NULL*, in this case :c:func:`!PySequence_InPlaceRepeat` will fall back to :c:func:`PySequence_Repeat`. It is also used by the - augmented assignment ``*=``, after trying numeric inplace multiplication + augmented assignment ``*=``, after trying numeric in-place multiplication via the :c:member:`~PyNumberMethods.nb_inplace_multiply` slot. diff --git a/Doc/library/operator.rst b/Doc/library/operator.rst index 250cbb6b7c..5d0ea7dfdd 100644 --- a/Doc/library/operator.rst +++ b/Doc/library/operator.rst @@ -440,8 +440,8 @@ Python syntax and the functions in the :mod:`operator` module. | Ordering | ``a > b`` | ``gt(a, b)`` | +-----------------------+-------------------------+---------------------------------------+ -Inplace Operators ------------------ +In-place Operators +------------------ Many operations have an "in-place" version. Listed below are functions providing a more primitive access to in-place operators than the usual syntax @@ -464,7 +464,7 @@ value is computed, but not assigned back to the input variable: >>> a 'hello' -For mutable targets such as lists and dictionaries, the inplace method +For mutable targets such as lists and dictionaries, the in-place method will perform the update, so no subsequent assignment is necessary: >>> s = ['h', 'e', 'l', 'l', 'o']