Skip to content

Commit

Permalink
Correct "inplace" with "in-place" (pythonGH-10480)
Browse files Browse the repository at this point in the history
  • Loading branch information
andresdelfino authored and methane committed Apr 8, 2019
1 parent 96be340 commit f4efa31
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Doc/c-api/typeobj.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.


Expand Down
6 changes: 3 additions & 3 deletions Doc/library/operator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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']
Expand Down

0 comments on commit f4efa31

Please sign in to comment.