|
def | __init__ (self, factory, option_strings, dest, **kwargs) |
|
def | __call__ (self, parser, namespace, values, option_string=None) |
|
Definition at line 61 of file trfArgClasses.py.
◆ __init__()
def python.trfArgClasses.argAction.__init__ |
( |
|
self, |
|
|
|
factory, |
|
|
|
option_strings, |
|
|
|
dest, |
|
|
** |
kwargs |
|
) |
| |
Definition at line 62 of file trfArgClasses.py.
62 def __init__(self, factory, option_strings, dest, **kwargs):
63 self._factory = factory
64 super().
__init__(option_strings, dest, **kwargs)
◆ __call__()
def python.trfArgClasses.argAction.__call__ |
( |
|
self, |
|
|
|
parser, |
|
|
|
namespace, |
|
|
|
values, |
|
|
|
option_string = None |
|
) |
| |
Definition at line 66 of file trfArgClasses.py.
66 def __call__(self, parser, namespace, values, option_string=None):
67 msg.debug(
'Called action for factory=%s; values=%s', self._factory, values)
70 if isinstance(values, list):
73 setattr(namespace, self.dest, [self._factory(
None)])
75 setattr(namespace, self.dest, [self._factory(v)
for v
in values])
77 setattr(namespace, self.dest, self._factory(values))
◆ _factory
python.trfArgClasses.argAction._factory |
|
private |
The documentation for this class was generated from the following file: