Message263223
desbma:
Rereading your latest code and comment:
> * The meaning of the 'type' parameter for StoreEnumAction is somewhat different than for other actions (enum class vs callable that validates)
it occurred to me that that parameter does not have to be named 'type'. It could just as well be 'enumClass' or something else. It's just local to the class __init__ method.
Something that's come up with other Action classes is that the parameter list is not well documented. While there's a generic set of parameters, the subclasses vary in what they accept or require or ignore. The docs don't elaborate, and the error messages can be cryptic. A new class with a new parameter (whether new in name or meaning) can add to that confusion.
We need to think more abstractly, so we aren't just improving the handling of 'enums', but also all their derived and meta classes. And possibly other mappings, where we want to do a 'key' lookup, and form help strings of the choices. |
|
Date |
User |
Action |
Args |
2016-04-12 05:42:49 | paul.j3 | set | recipients:
+ paul.j3, barry, rhettinger, bethard, desbma, leycec |
2016-04-12 05:42:49 | paul.j3 | set | messageid: <1460439769.37.0.850434993785.issue25061@psf.upfronthosting.co.za> |
2016-04-12 05:42:49 | paul.j3 | link | issue25061 messages |
2016-04-12 05:42:48 | paul.j3 | create | |
|