Steven, I’ve lost track of the details of each version, and the examples you give don’t seem to disambiguate the alternatives completely. Could you write up the alternatives a bit more precisely without requiring context of the thread?

On Thu, Jun 17, 2021 at 16:04 Steven Troxler <steven.troxler@gmail.com> wrote:
This is my order of preference among options so far:

(1) mixed shorthand syntax where explicit parameter types are required and no name implies positional
     - I'd prefer to make no-name-given the *only* way to do positional-only args, i.e. no `/` in the syntax
     - this is not consistent with stub syntax, but it avoids some edge cases we hit otherwise
     - I don't think requiring explicit types is a huge burden, the existing `Callable` type requires it

(2) full stub syntax, with a shorthand syntax for positional-only callables
     - we would have to require explicit Any annotations:
        - otherwise, we get collisions between shorthand syntax and implicit Any
        - for example, is `(a, b) -> int` of type `Callable[[Any, Any], int]` or `Callable[[a, b], int`?

(3) full stub syntax only, with no shorthand
     - it seems like a majority thinks this is burdensome because of existing Callables
     - If we want to be able to revisit shorthand syntax later if we have to require explicit Any
       - otherwise, the ambiguous case described above plus backward compatibility will trap us


If we move forward with options (2) or (3) we'll still have to decide whether to allow _ as the argument name for positional-only args. My preference would be to allow it so that nuisance argnames aren't required, but to require an explicit `/`
_______________________________________________
Typing-sig mailing list -- typing-sig@python.org
To unsubscribe send an email to typing-sig-leave@python.org
https://mail.python.org/mailman3/lists/typing-sig.python.org/
Member address: guido@python.org
--
--Guido (mobile)