mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
Clarify docs for functions taking bytes and not str.
This commit is contained in:
parent
e763f04689
commit
55dc131944
1
.gitignore
vendored
1
.gitignore
vendored
@ -27,6 +27,7 @@ MANIFEST
|
|||||||
*.py[co]
|
*.py[co]
|
||||||
*.egg-info
|
*.egg-info
|
||||||
*~
|
*~
|
||||||
|
.*.swp
|
||||||
.DS_Store
|
.DS_Store
|
||||||
/dist
|
/dist
|
||||||
/build
|
/build
|
||||||
|
@ -58,7 +58,9 @@ Passing bytes to C++
|
|||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
A Python ``bytes`` object will be passed to C++ functions that accept
|
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
|
Returning C++ strings to Python
|
||||||
|
Loading…
Reference in New Issue
Block a user