Clarify docs for functions taking bytes and not str.

This commit is contained in:
Antony Lee 2017-11-14 19:52:11 -08:00 committed by Jason Rhinelander
parent e763f04689
commit 55dc131944
2 changed files with 4 additions and 1 deletions

1
.gitignore vendored
View File

@ -27,6 +27,7 @@ MANIFEST
*.py[co]
*.egg-info
*~
.*.swp
.DS_Store
/dist
/build

View File

@ -58,7 +58,9 @@ Passing bytes to C++
--------------------
A Python ``bytes`` object will be passed to C++ functions that accept
``std::string`` or ``char*`` *without* conversion.
``std::string`` or ``char*`` *without* conversion. On Python 3, in order to
make a function *only* accept ``bytes`` (and not ``str``), declare it as taking
a ``py::bytes`` argument.
Returning C++ strings to Python