Skip to content

Constraint checking on dictionary-class converter #31

Open
@phdum

Description

@phdum

Hi,

I wanted to run an idea by you to see if it would be interesting thing to implement.

I remember that when you have a convertor from python to cpp (via CPP2PY_ARG_AS_DICT), it does type checking of the input to make sure everything is well defined.

Would it also be possible to specify additional constraints / bounds / traits during this conversion?

For example, it would be nice to specify something that a parameter (e.g. temperature) should be > 0. This is then checked on conversion and gives an error message if it fails.

Or would this cause other problems?

Thanks!

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