pybind11/docs
Jason Rhinelander 2686da8350 Add support for positional args with args/kwargs
This commit rewrites the function dispatcher code to support mixing
regular arguments with py::args/py::kwargs arguments.  It also
simplifies the argument loader noticeably as it no longer has to worry
about args/kwargs: all of that is now sorted out in the dispatcher,
which now simply appends a tuple/dict if the function takes
py::args/py::kwargs, then passes all the arguments in a vector.

When the argument loader hit a py::args or py::kwargs, it doesn't do
anything special: it just calls the appropriate type_caster just like it
does for any other argument (thus removing the previous special cases
for args/kwargs).

Switching to passing arguments in a single std::vector instead of a pair
of tuples also makes things simpler, both in the dispatch and the
argument_loader: since this argument list is strictly pybind-internal
(i.e. it never goes to Python) we have no particular reason to use a
Python tuple here.

Some (intentional) restrictions:
- you may not bind a function that has args/kwargs somewhere other than
  the end (this somewhat matches Python, and keeps the dispatch code a
  little cleaner by being able to not worry about where to inject the
  args/kwargs in the argument list).
- If you specify an argument both positionally and via a keyword
  argument, you get a TypeError alerting you to this (as you do in
  Python).
2017-01-31 17:24:41 +01:00
..
_static documentation improvements 2016-04-26 23:48:55 +02:00
advanced Add support for positional args with args/kwargs 2017-01-31 17:24:41 +01:00
basics.rst Change compilation/test target back to check (#566) 2016-12-19 17:33:02 +01:00
benchmark.py Much more efficient generation of function signatures, updated docs 2016-01-17 22:31:15 +01:00
benchmark.rst ..mention in benchmark docs as well 2016-08-19 09:38:14 +02:00
changelog.rst use -x flag to strip shared libraries on OSX (fixes #595) 2017-01-06 14:20:26 +01:00
classes.rst Automate generation of reference docs with doxygen and breathe (#598) 2017-01-31 16:54:08 +01:00
compiling.rst reference binder project from documentation 2016-12-26 13:54:50 +01:00
conf.py Automate generation of reference docs with doxygen and breathe (#598) 2017-01-31 16:54:08 +01:00
Doxyfile Automate generation of reference docs with doxygen and breathe (#598) 2017-01-31 16:54:08 +01:00
environment.yml Automate generation of reference docs with doxygen and breathe (#598) 2017-01-31 16:54:08 +01:00
faq.rst add CMake exported interface library and Config detection file 2016-12-13 21:44:19 +01:00
index.rst Reorganize documentation 2016-10-20 15:21:34 +02:00
intro.rst Make non-ancient version of GCC explicit in documentation (it means 4.8+) (#575) 2016-12-28 12:10:11 +01:00
limitations.rst Multiple inheritance support 2016-09-19 13:45:31 +02:00
Makefile took a stab at some documentation 2015-10-13 03:16:44 +02:00
pybind11_vs_boost_python1.png documentation improvements 2016-04-28 15:32:07 +02:00
pybind11_vs_boost_python1.svg Much more efficient generation of function signatures, updated docs 2016-01-17 22:31:15 +01:00
pybind11_vs_boost_python2.png documentation improvements 2016-04-28 15:32:07 +02:00
pybind11_vs_boost_python2.svg Much more efficient generation of function signatures, updated docs 2016-01-17 22:31:15 +01:00
pybind11-logo.png Very minor documentation fixes, updated logo 2016-01-17 22:31:15 +01:00
reference.rst Automate generation of reference docs with doxygen and breathe (#598) 2017-01-31 16:54:08 +01:00
release.rst minor setup.py updates 2017-01-01 17:14:27 +01:00