Make sure you've completed the following steps before submitting your issue -- thank you!
Issue description
According to the documentation, to let a C++ function returns bytes instead of unicode string in Python, one needs to use py::bytes: http://pybind11.readthedocs.io/en/stable/advanced/cast/strings.html?highlight=string#return-c-strings-without-conversion.
However I found that py::bytes calls PyBytes_FromString function, which copies the string according to https://docs.python.org/3/c-api/bytes.html#c.PyBytes_FromString.
Is there anyway to construct a bytes object directly in C++ without an extra copy?