@@ -193,7 +193,8 @@ FILE: include/pybind11/pytypes.h
193
193
194
194
See also: Python C API documentation for `PyMemoryView_FromBuffer`_.
195
195
196
- .. _PyMemoryView_FromBuffer: https://docs.python.org/c-api/memoryview.html#c.PyMemoryView_FromBuffer
196
+ .. _PyMemoryView_FromBuffer:
197
+ https://docs.python.org/c-api/memoryview.html#c.PyMemoryView_FromBuffer
197
198
198
199
:param ptr: Pointer to the buffer.
199
200
:param itemsize: Byte size of an element.
@@ -219,8 +220,8 @@ FILE: include/pybind11/pytypes.h
219
220
220
221
See also: Python C API documentation for `PyMemoryView_FromBuffer`_.
221
222
222
- .. _PyMemoryView_FromMemory: https://docs.python.org/c-api/memoryview.html#c.PyMemoryView_FromMemory
223
- \endrst */
223
+ .. _PyMemoryView_FromMemory:
224
+ https://docs.python.org/c-api/memoryview.html#c.PyMemoryView_FromMemory \endrst */
224
225
225
226
FILE: include/pybind11/cast.h
226
227
/** \rst
@@ -363,9 +364,8 @@ FILE: include/pybind11/pybind11.h
363
364
Adds an object to the module using the given name. Throws if an object with the given name
364
365
already exists.
365
366
366
- ``overwrite`` should almost always be false: attempting to overwrite objects that pybind11 has
367
- established will, in most cases, break things.
368
- \endrst */
367
+ ``overwrite`` should almost always be false: attempting to overwrite objects that pybind11
368
+ has established will, in most cases, break things. \endrst */
369
369
370
370
FILE: include/pybind11/pybind11.h
371
371
/** \rst
@@ -377,20 +377,21 @@ FILE: include/pybind11/pybind11.h
377
377
378
378
FILE: include/pybind11/pybind11.h
379
379
/** \rst
380
- Try to retrieve a python method by the provided name from the instance pointed to by the this_ptr.
380
+ Try to retrieve a python method by the provided name from the instance pointed to by the
381
+ this_ptr.
381
382
382
- :this_ptr: The pointer to the object the overridden method should be retrieved for. This should be
383
- the first non-trampoline class encountered in the inheritance chain.
384
- :name: The name of the overridden Python method to retrieve.
385
- :return: The Python method by this name from the object or an empty function wrapper.
386
- \endrst */
383
+ :this_ptr: The pointer to the object the overridden method should be retrieved for. This should
384
+ be the first non-trampoline class encountered in the inheritance chain. :name: The name of the
385
+ overridden Python method to retrieve. :return: The Python method by this name from the object or
386
+ an empty function wrapper. \endrst */
387
387
388
388
FILE: include/pybind11/pybind11.h
389
389
/** \rst
390
- Macro to populate the virtual method in the trampoline class. This macro tries to look up a method named 'fn'
391
- from the Python side, deals with the :ref:`gil` and necessary argument conversions to call this method and return
392
- the appropriate type. See :ref:`overriding_virtuals` for more information. This macro should be used when the method
393
- name in C is not the same as the method name in Python. For example with `__str__`.
390
+ Macro to populate the virtual method in the trampoline class. This macro tries to look up a
391
+ method named 'fn' from the Python side, deals with the :ref:`gil` and necessary argument
392
+ conversions to call this method and return the appropriate type. See :ref:`overriding_virtuals` for
393
+ more information. This macro should be used when the method name in C is not the same as the method
394
+ name in Python. For example with `__str__`.
394
395
395
396
.. code-block:: cpp
396
397
@@ -406,16 +407,15 @@ FILE: include/pybind11/pybind11.h
406
407
407
408
FILE: include/pybind11/pybind11.h
408
409
/** \rst
409
- Macro for pure virtual functions, this function is identical to :c:macro:`PYBIND11_OVERRIDE_NAME`, except that it
410
- throws if no override can be found.
411
- \endrst */
410
+ Macro for pure virtual functions, this function is identical to
411
+ :c:macro:`PYBIND11_OVERRIDE_NAME`, except that it throws if no override can be found. \endrst */
412
412
413
413
FILE: include/pybind11/pybind11.h
414
414
/** \rst
415
- Macro to populate the virtual method in the trampoline class. This macro tries to look up the method
416
- from the Python side, deals with the :ref:`gil` and necessary argument conversions to call this method and return
417
- the appropriate type. This macro should be used if the method name in C and in Python are identical.
418
- See :ref:`overriding_virtuals` for more information.
415
+ Macro to populate the virtual method in the trampoline class. This macro tries to look up the
416
+ method from the Python side, deals with the :ref:`gil` and necessary argument conversions to call
417
+ this method and return the appropriate type. This macro should be used if the method name in C and
418
+ in Python are identical. See :ref:`overriding_virtuals` for more information.
419
419
420
420
.. code-block:: cpp
421
421
@@ -438,9 +438,8 @@ FILE: include/pybind11/pybind11.h
438
438
439
439
FILE: include/pybind11/pybind11.h
440
440
/** \rst
441
- Macro for pure virtual functions, this function is identical to :c:macro:`PYBIND11_OVERRIDE`, except that it throws
442
- if no override can be found.
443
- \endrst */
441
+ Macro for pure virtual functions, this function is identical to :c:macro:`PYBIND11_OVERRIDE`,
442
+ except that it throws if no override can be found. \endrst */
444
443
445
444
FILE: include/pybind11/iostream.h
446
445
/** \rst
@@ -463,8 +462,8 @@ FILE: include/pybind11/iostream.h
463
462
.. code-block:: cpp
464
463
465
464
{
466
- py::scoped_ostream_redirect output{std::cerr, py::module::import("sys").attr("stderr")};
467
- std::cout << "Hello, World!";
465
+ py::scoped_ostream_redirect output{std::cerr,
466
+ py::module::import("sys").attr("stderr")}; std::cout << "Hello, World!";
468
467
}
469
468
\endrst */
470
469
0 commit comments