boostorg / boostorg/python

Bug in example code for Embedding page in Boost.Python tutorial

Open
#353 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
537
Forks
223
Avg merge
11h 22m
Merged PRs (30d)
2

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.