Skip to content

Consider integration with data classes (PEP 557) #1

@krassowski

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions