On 3/11/21 4:20 AM, Ricky Teachey wrote:
This might be a bit of an extreme step to take, but has new syntax for this ever been discussed? Here I am using the same indicator for keyword arguments as in a function signature, hanging on a line by itself:
@dataclasses.dataclass class Comparator: a: Any b: Any * key: Optional[Callable[whatever]] = None
Could also support the positional only version:
@dataclasses.dataclass class Comparator: / # args become positional after this line a: Any b: Any * # args become kwd args after this line key: Optional[Callable[whatever]] = None
Actually, the '/' indicates that names /before/ it are positional only.