[Python-Dev] Re: Type annotations, PEP 649 and PEP 563

2021-10-26 Thread Bluenix
> * Functions having the same signature share the same annotation tuple. Is this true with code that have a mutable default? >>> def a(arg = []): ... arg.append('a') ... return arg ... >>> def b(arg = []): ... arg.append('b') ... return arg ... >>> a() ['a'] >>> a() ['a', 'a'] >>>

[Python-Dev] Re: Type annotations, PEP 649 and PEP 563

2021-10-26 Thread Larry Hastings
On 10/26/21 5:22 PM, Bluenix wrote: * Functions having the same signature share the same annotation tuple. Is this true with code that have a mutable default? [... examples deleted...] You're confusing two disjoint concepts. First of all, all your examples experiment with default values whi