Bug in example code for Embedding page in Boost.Python tutorial
- Vorherrschende Sprache
- C++
- Sterne
- 537
- Forks
- 223
- Ø Merge
- 11 Std. 22 Min.
- Gemergte PRs (30 T.)
- 2
Beschreibung
Hi all,
on page https://www.boost.org/doc/libs/1_75_0/libs/python/doc/html/tutorial/tutorial/embedding.html there is a bug in the example code.
The line
object ignored = exec("hello = file('hello.txt', 'w')\n"
will cause an error_already_set exception (using Python 3.7 on Windows 10).
The line should read
object ignored = exec("hello = open('hello.txt', 'w+')\n"
Best regards
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Open the Boost.Python embedding tutorial at the URL in the issue and inspect the example line that assigns exec("hello = file('hello.txt', 'w')\n"). Confirm the example uses the Python 3-compatible open call described in the report. Done when the tutorial example no longer raises the reported error on Python 3.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- cpp, python
- Bereich
- documentation
- Issue-Typ
- Bug
- Schwierigkeit
- 1/5
- Geschätzter Aufwand
- Unter einer Stunde
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 55/100