New submission from Mark Shannon <[email protected]>:
The STORE_ANNOTATION bytecode is used to implement annotations.
The code
name : ann
is equivalent to
__annotations__['name'] = ann
Consequently,
STORE_ANNOTATION name
can be trivially replaced with
LOAD_NAME __annotations__
LOAD_CONST 'name'
STORE_SUBSCR
----------
components: Interpreter Core
messages: 309918
nosy: Mark.Shannon
priority: normal
severity: normal
stage: needs patch
status: open
title: STORE_ANNOTATION bytecode is unnecessary and can be removed.
type: enhancement
versions: Python 3.7
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue32550>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com