Skip to content

Commit

Permalink
Update basics.rst (#139)
Browse files Browse the repository at this point in the history
fix C++ code using `.` instead of `;` to end statements
  • Loading branch information
geoffthemedio committed Mar 7, 2023
1 parent 7b3e893 commit bc7aa4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/basics.rst
Expand Up @@ -173,7 +173,7 @@ provided. The modified binding code looks as follows:
NB_MODULE(my_ext, m) {
m.def("add", &add, "a"_a, "b"_a = 1,
"This function adds two numbers and increments if only one is provided").
"This function adds two numbers and increments if only one is provided.");
}
Let's go through all of the changed lines. The first sets up a short
Expand Down Expand Up @@ -202,7 +202,7 @@ binding declarations, which can be specified in any order.
.. code-block:: cpp
m.def("add", &add, "a"_a, "b"_a = 1,
"This function adds two numbers and increments if only one is provided").
"This function adds two numbers and increments if only one is provided.");
The string at the end is a `docstring <https://peps.python.org/pep-0257/>`_
that will later show up in generated documentation. The argument annotations
Expand Down

0 comments on commit bc7aa4a

Please sign in to comment.