diff --git a/.gitignore b/.gitignore index c444c17ed..979fd4431 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ MANIFEST *.py[co] *.egg-info *~ +.*.swp .DS_Store /dist /build diff --git a/docs/advanced/cast/strings.rst b/docs/advanced/cast/strings.rst index 2cdbade3a..e25701eca 100644 --- a/docs/advanced/cast/strings.rst +++ b/docs/advanced/cast/strings.rst @@ -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