Skip to content

Commit

Permalink
Clarify docs for functions taking bytes and not str.
Browse files Browse the repository at this point in the history
  • Loading branch information
anntzer authored and jagerman committed May 24, 2018
1 parent e763f04 commit 55dc131
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ MANIFEST
*.py[co]
*.egg-info
*~
.*.swp
.DS_Store
/dist
/build
Expand Down
4 changes: 3 additions & 1 deletion docs/advanced/cast/strings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 55dc131

Please sign in to comment.