Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
3e2e44f5
Commit
3e2e44f5
authored
Jul 18, 2016
by
Jason Rhinelander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated advanced.rst example references
parent
b3f3d79f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
36 deletions
+40
-36
docs/advanced.rst
+40
-36
No files found.
docs/advanced.rst
View file @
3e2e44f5
...
@@ -102,8 +102,9 @@ C++ side, or to perform other types of customization.
...
@@ -102,8 +102,9 @@ C++ side, or to perform other types of customization.
.. seealso::
.. seealso::
The file :file:`example/example3.cpp` contains a complete example that
The file :file:`example/example-operator-overloading.cpp` contains a
demonstrates how to work with overloaded operators in more detail.
complete example that demonstrates how to work with overloaded operators in
more detail.
Callbacks and passing anonymous functions
Callbacks and passing anonymous functions
=========================================
=========================================
...
@@ -209,8 +210,9 @@ The following interactive session shows how to call them from Python.
...
@@ -209,8 +210,9 @@ The following interactive session shows how to call them from Python.
This functionality is very useful when generating bindings for callbacks in
This functionality is very useful when generating bindings for callbacks in
C++ libraries (e.g. GUI libraries, asynchronous networking libraries, etc.).
C++ libraries (e.g. GUI libraries, asynchronous networking libraries, etc.).
The file :file:`example/example5.cpp` contains a complete example that
The file :file:`example/example-callbacks.cpp` contains a complete example
demonstrates how to work with callbacks and anonymous functions in more detail.
that demonstrates how to work with callbacks and anonymous functions in
more detail.
Overriding virtual functions in Python
Overriding virtual functions in Python
======================================
======================================
...
@@ -347,9 +349,9 @@ Please take a look at the :ref:`macro_notes` before using this feature.
...
@@ -347,9 +349,9 @@ Please take a look at the :ref:`macro_notes` before using this feature.
.. seealso::
.. seealso::
The file :file:`example/example
12.cpp` contains a complete example that
The file :file:`example/example
-virtual-functions.cpp` contains a complete
demonstrates how to override virtual functions using pybind11 in more
example that demonstrates how to override virtual functions using pybind11
detail.
in more
detail.
.. _macro_notes:
.. _macro_notes:
...
@@ -433,8 +435,8 @@ out of the box with just the core :file:`pybind11/pybind11.h` header.
...
@@ -433,8 +435,8 @@ out of the box with just the core :file:`pybind11/pybind11.h` header.
.. seealso::
.. seealso::
The file :file:`example/example
2.cpp` contains a complete example that
The file :file:`example/example
-python-types.cpp` contains a complete
demonstrates how to pass STL data types in more detail.
example that
demonstrates how to pass STL data types in more detail.
Binding sequence data types, iterators, the slicing protocol, etc.
Binding sequence data types, iterators, the slicing protocol, etc.
==================================================================
==================================================================
...
@@ -443,10 +445,10 @@ Please refer to the supplemental example for details.
...
@@ -443,10 +445,10 @@ Please refer to the supplemental example for details.
.. seealso::
.. seealso::
The file :file:`example/example
6.cpp` contains a complete example that
The file :file:`example/example
-sequences-and-iterators.cpp` contains a
shows how to bind a sequence data type, including length queries
complete example that shows how to bind a sequence data type, including
(``__len__``), iterators (``__iter__``), the slicing protocol and other
length queries (``__len__``), iterators (``__iter__``), the slicing
kinds of useful operations.
protocol and other
kinds of useful operations.
Return value policies
Return value policies
=====================
=====================
...
@@ -630,8 +632,8 @@ might be declared as follows:
...
@@ -630,8 +632,8 @@ might be declared as follows:
.. seealso::
.. seealso::
The file :file:`example/example
13.cpp` contains a complete example that
The file :file:`example/example
-keep-alive.cpp` contains a complete example
demonstrates using :class:`keep_alive` in more detail.
that
demonstrates using :class:`keep_alive` in more detail.
Implicit type conversions
Implicit type conversions
=========================
=========================
...
@@ -832,9 +834,9 @@ Please take a look at the :ref:`macro_notes` before using this feature.
...
@@ -832,9 +834,9 @@ Please take a look at the :ref:`macro_notes` before using this feature.
.. seealso::
.. seealso::
The file :file:`example/example
8.cpp` contains a complete example that
The file :file:`example/example
-smart-ptr.cpp` contains a complete example
demonstrates how to work with custom reference-counting holder types in
that demonstrates how to work with custom reference-counting holder types
more detail.
in
more detail.
.. _custom_constructors:
.. _custom_constructors:
...
@@ -939,7 +941,7 @@ a first shot at handling the exception).
...
@@ -939,7 +941,7 @@ a first shot at handling the exception).
Inside the translator, ``std::rethrow_exception`` should be used within
Inside the translator, ``std::rethrow_exception`` should be used within
a try block to re-throw the exception. A catch clause can then use
a try block to re-throw the exception. A catch clause can then use
``PyErr_SetString`` to set a Python exception as demonstrated
``PyErr_SetString`` to set a Python exception as demonstrated
in :file:`example
19
.cpp``.
in :file:`example
-custom-exceptions
.cpp``.
This example also demonstrates how to create custom exception types
This example also demonstrates how to create custom exception types
with ``py::exception``.
with ``py::exception``.
...
@@ -1077,9 +1079,9 @@ Please take a look at the :ref:`macro_notes` before using this feature.
...
@@ -1077,9 +1079,9 @@ Please take a look at the :ref:`macro_notes` before using this feature.
.. seealso::
.. seealso::
The file :file:`example/example
14.cpp` contains a complete example that
The file :file:`example/example
-opaque-types.cpp` contains a complete
demonstrates how to create and expose opaque types using pybind11 in more
example that demonstrates how to create and expose opaque types using
detail.
pybind11 in more
detail.
.. _eigen:
.. _eigen:
...
@@ -1249,8 +1251,8 @@ limitations), refer to the section on :ref:`eigen`.
...
@@ -1249,8 +1251,8 @@ limitations), refer to the section on :ref:`eigen`.
.. seealso::
.. seealso::
The file :file:`example/example
7.cpp` contains a complete example that
The file :file:`example/example
-buffers.cpp` contains a complete example
demonstrates using the buffer protocol with pybind11 in more detail.
that
demonstrates using the buffer protocol with pybind11 in more detail.
.. [#f2] http://docs.python.org/3/c-api/buffer.html
.. [#f2] http://docs.python.org/3/c-api/buffer.html
...
@@ -1398,8 +1400,8 @@ simply using ``vectorize``).
...
@@ -1398,8 +1400,8 @@ simply using ``vectorize``).
.. seealso::
.. seealso::
The file :file:`example/example
10.cpp` contains a complete example that
The file :file:`example/example
-numpy-vectorize.cpp` contains a complete
demonstrates using :func:`vectorize` in more detail.
example that
demonstrates using :func:`vectorize` in more detail.
Functions taking Python objects as arguments
Functions taking Python objects as arguments
============================================
============================================
...
@@ -1462,9 +1464,10 @@ with other parameters.
...
@@ -1462,9 +1464,10 @@ with other parameters.
.. seealso::
.. seealso::
The file :file:`example/example2.cpp` contains a complete example that
The file :file:`example/example-python-types.cpp` contains a complete
demonstrates passing native Python types in more detail. The file
example that demonstrates passing native Python types in more detail. The
:file:`example/example11.cpp` discusses usage of ``args`` and ``kwargs``.
file :file:`example/example-arg-keywords-and-defaults.cpp` discusses usage
of ``args`` and ``kwargs``.
Default arguments revisited
Default arguments revisited
===========================
===========================
...
@@ -1537,11 +1540,11 @@ Such functions can also be created using pybind11:
...
@@ -1537,11 +1540,11 @@ Such functions can also be created using pybind11:
/// Binding code
/// Binding code
m.def("generic", &generic);
m.def("generic", &generic);
(See ``example/example
11.cpp``). The class ``py::args`` derives from
(See ``example/example
-arg-keywords-and-defaults.cpp``). The class ``py::args``
``py::list`` and ``py::kwargs`` derives from ``py::dict`` Note that th
e
derives from ``py::list`` and ``py::kwargs`` derives from ``py::dict`` Not
e
``kwargs`` argument is invalid if no keyword arguments were actually provided.
that the ``kwargs`` argument is invalid if no keyword arguments were actually
Please refer to the other examples for details on how to iterate over these,
provided. Please refer to the other examples for details on how to iterate
and on how to cast their entries into C++ objects.
over these,
and on how to cast their entries into C++ objects.
Partitioning code over multiple extension modules
Partitioning code over multiple extension modules
=================================================
=================================================
...
@@ -1682,8 +1685,9 @@ memory corruption and/or segmentation faults.
...
@@ -1682,8 +1685,9 @@ memory corruption and/or segmentation faults.
.. seealso::
.. seealso::
The file :file:`example/example15.cpp` contains a complete example that
The file :file:`example/example-pickling.cpp` contains a complete example
demonstrates how to pickle and unpickle types using pybind11 in more detail.
that demonstrates how to pickle and unpickle types using pybind11 in more
detail.
.. [#f3] http://docs.python.org/3/library/pickle.html#pickling-class-instances
.. [#f3] http://docs.python.org/3/library/pickle.html#pickling-class-instances
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment