From 5b43ac42a0553cb603ead1cd62e364c04e854f28 Mon Sep 17 00:00:00 2001 From: Henry Fredrick Schreiner Date: Tue, 19 Jan 2021 19:56:22 -0500 Subject: [PATCH] docs: fix missing line from #2310 --- include/pybind11/iostream.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/pybind11/iostream.h b/include/pybind11/iostream.h index 59d33e91f..7f34bb201 100644 --- a/include/pybind11/iostream.h +++ b/include/pybind11/iostream.h @@ -104,10 +104,8 @@ PYBIND11_NAMESPACE_END(detail) .. code-block:: cpp { - py::scoped_ostream_redirect output{ - std::cerr, - py::module::import("sys").attr("stderr") - }; + py::scoped_ostream_redirect output{std::cerr, py::module::import("sys").attr("stderr")}; + std::cout << "Hello, World!"; } \endrst */ class scoped_ostream_redirect {