paul j3 added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25061>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to