Skip to content

Consider integration with data classes (PEP 557) #1

Description

@krassowski

As suggested by a mod of r/pythoncoding, it might be a good idea to make use of data classes as defined in recently accepted PEP 557. I would like to know if there is a demand for that before trying to implement it. It could look like:

class OutputOptions(Parser):
    format: Argument(choices=supported_formats) = 'jpeg'
    # or
    scale: Argument[int, 'Rescale image to % of original size'] = 100

NB. it would be only available with 3.7+ unless backports are provided.

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

      Issue actions