On Wed, Mar 1, 2017 at 2:16 PM, אלעזר email@example.com wrote:
I like the idea, but I wanted to note that since it has no meaning from the point of view of the defined function, it can be done with a magic decorator, so new syntax is not required:
@positional_only[:4] def replace(self, old, new, count=-1): ...
I"m confused, what does the [:4] mean?
if you want old and new to be positional only, wouldn't it be something like:
@positional_only(3) def replace(self, old, new, count=-1): ...
i.e. the first three parameters are positional only.
and why indexing/slice syntax???
+! on the idea -- still on the fence about syntax.