This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Mark.Shannon, gvanrossum, levkivskyi, serhiy.storchaka, yselivanov
Date 2018-01-14.12:30:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
There some subtle differences.

1. Unlike to LOAD_NAME, STORE_ANNOTATION doesn't fall back to globals if '__annotations__' is not found in locals. The behavior difference is shown by the following example:

    x: int
    class A:                                                                                                                                                                                                                    
        del __annotations__                                                                                                                                                                                                                    
        y: int

2. The single STORE_ANNOTATION is faster than 3 other opcodes.

3. It doesn't add a name constant. Instead it uses a name from the names list (which already has to contain this name).
Date User Action Args
2018-01-14 12:30:18serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, Mark.Shannon, yselivanov, levkivskyi
2018-01-14 12:30:18serhiy.storchakasetmessageid: <>
2018-01-14 12:30:18serhiy.storchakalinkissue32550 messages
2018-01-14 12:30:17serhiy.storchakacreate