declarative-parser
declarative-parser copied to clipboard
Consider integration with data classes (PEP 557)
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.