Skip to content

Fix __str__ call for all Python objects #342

@tooruu

Description

@tooruu

boost::python::object utf8Text = o.attr("__str__")();

Naively calling __str__() on an object assumes it is bound, which is not the case for non-instantiated classes.
Would it be possible to use Python's str builtin?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions