equal
deleted
inserted
replaced
5 short='' |
5 short='' |
6 map={} |
6 map={} |
7 dt={} |
7 dt={} |
8 |
8 |
9 for s, l, d, c in options: |
9 for s, l, d, c in options: |
10 map['-'+s] = map['--'+l]=l |
10 pl = l.replace('-', '_') |
11 state[l] = d |
11 map['-'+s] = map['--'+l] = pl |
12 dt[l] = type(d) |
12 state[pl] = d |
|
13 dt[pl] = type(d) |
13 if not d is None and not callable(d): |
14 if not d is None and not callable(d): |
14 if s: s += ':' |
15 if s: s += ':' |
15 if l: l += '=' |
16 if l: l += '=' |
16 if s: short = short + s |
17 if s: short = short + s |
17 if l: long.append(l) |
18 if l: long.append(l) |