Skip to content

Generated init methods should or could check that all mandatory fields in the class have been set. #24

@smarie

Description

@smarie
Owner

From #2

At the end of generated init methods, we could optionally enable validation that all mandatory fields have been set. That could be implicit or explicit. A prerequisite is to have a function able to provide this functionality on an object class (getting behind the scenes the list of fields applicable to this class).

This function could also be explicitly used by users, anywhere in their code (in an init method or elsewhere)

Note that this is not as simple as looking at the init arguments

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @smarie

        Issue actions

          Generated init methods should or could check that all mandatory fields in the class have been set. · Issue #24 · smarie/python-pyfields