
+1 on the idea, -1 on the syntax. i'm probably not a very skilled developer but i have found myself repeating variable names often enough that i've felt annoyed by it. alex hall's syntax suggested syntax seems nice. would be fun to be able to write:
a=1 b=2 dict(*, a, b) {'a': 1, 'b': 2}
I think this is still pretty clear:
self.do_something(positional, *, keyword, keyword1=somethingelse, keyword2)
but if you don't like that you can easily add a restriction that no explicit keywords are allowed after *, so:
self.do_something(positional, keyword1=somethingelse, *, keyword2, keyword)
One note about that: since kwarg dictionaries are now officially ordered, it would be a little bit of a problem to disallow this: def f(*args, **kwargs): pass f(pos1, pos2, *, kw1, kw2, kw3=other) ...and require this instead: f(pos1, pos2, kw3=other, *, kw1, kw2) ...because then the syntax is forcing the order in the **kwargs dictionary to change. now you can't use the feature at all if the order is important.