> * 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']
>>>
Hmm, I thought I responded to this on Gmail but it hasn't appeared here on the
archive so I'll send it again..
Is it known how much more/less the annotations impact performance compared to
function defaults?
--
Blue
___
Python-Dev mailing list -- pyth
Hello!
> This would affect code that expects annotations to always be strings, but such
> code would have to be poking directly at function objects (the
> __annotations__ attribute), instead of using the advertised ways of getting
> at annotations (like typing.get_type_hints()).
I would speculat
Please accept PEP 649!
Python's type hinting has become so much more useful than originally thought,
and without this change much of that will be hindered. For example (you already
know about Pydantic and FastAPI)
[discord.py](https://github.com/Rapptz/discord.py)'s commands system allows you