Skip to content

[Improvements] from_pyobject should not panic on unknown types #12

@konn

Description

@konn

Currently, from_pyobject panics on input with a type unknown to the library:

unreachable!("Unsupported type: {}", self.0.get_type());

This prevents users from using serde_pyobject::from_pyobject in FromPyObject and/or other casting function, so it should return Err instead of panicking by unreachable!.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions