Skip to content

() to empty tuple conversion is confusing #4896

Open
@mitsuhiko

Description

I just managed to upgrade to the latest PyO3 and I was immediately bitten by the new () to empty tuple conversion. I was especially confused because there is a special case now that #[pyfunction] does actually still perform the old conversion, but into_py_any and friends do not.

I'm not sure what the motivation of this change was, but I now need to manually handle that case in a few places. Is there ever a situation where you want to treat () as an empty tuple?

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions