
On Wed, Jun 16, 2021 at 12:29 PM Jelle Zijlstra <jelle.zijlstra@gmail.com> wrote:
El mié, 16 jun 2021 a las 12:26, Guido van Rossum (<guido@python.org>) escribió: That sounds reasonable. The one case where it would be a bit verbose is if you have a bunch of mandatory positional parameters and one optional keyword. Without this restriction you could write this as
f: (int, int, str, str, mode: str = "r") -> bool
whereas in your version it would have to become
f: (a1: int, a2: int, a3: str, a4: str, mode: str = "r") -> bool That's actually subtly different, because it would require positional-or-keyword arguments, so a callable with differently named arguments would not be compatible. The unambiguous equivalent would need `/,`. Though of course we could decide that the rules should be more lenient here.
You're right, I forgot the / there. I agree that the shorthand should always imply the /. -- --Guido van Rossum (python.org/~guido) *Pronouns: he/him **(why is my pronoun here?)* <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-c...>