On Tue, Oct 18, 2022 at 12:20:18AM +0800, Kent Gibson wrote: > On Tue, Oct 18, 2022 at 12:09:10AM +0800, Kent Gibson wrote: ... > Oh, btw, the parser fn version would be something like: > > def parse_value(arg): > (x,y) = arg.split("=") > return (x, Value(int(y))) Not a lisp, no need for too many parentheses. Also, we could use splices: eqidx = arg.index('=') return arg[:eqidx], Value(int(arg[eqidx + 1:])) or with split() l, v = arg.split('=') return l, Value(int(v)) > lvs = [ parse_value(arg) for arg in sys.argv[2:] Dunno why you put spaces inside outer [], but okay. > Is that clearer? -- With Best Regards, Andy Shevchenko