aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/asyncio/mixins.py
diff options
context:
space:
mode:
authorYurii Karabas <1998uriyyo@gmail.com>2020-11-25 12:43:18 +0200
committerGitHub <noreply@github.com>2020-11-25 19:43:18 +0900
commit7301979b23406220510dd2c7934a21b41b647119 (patch)
tree296b337317ac71d34001c17f4b4b7bea918cbf6f /Lib/asyncio/mixins.py
parent85c84920f511d0d73a133336daeaf715a022cd64 (diff)
downloadcpython-7301979b23406220510dd2c7934a21b41b647119.tar.gz
cpython-7301979b23406220510dd2c7934a21b41b647119.zip
bpo-42202: Store func annotations as a tuple (GH-23316)
Reduce memory footprint and improve performance of loading modules having many func annotations. >>> sys.getsizeof({"a":"int","b":"int","return":"int"}) 232 >>> sys.getsizeof(("a","int","b","int","return","int")) 88 The tuple is converted into dict on the fly when `func.__annotations__` is accessed first. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Inada Naoki <songofacandy@gmail.com>
Diffstat (limited to 'Lib/asyncio/mixins.py')
0 files changed, 0 insertions, 0 deletions