Message309919
| 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 | <1515933018.1.0.467229070634.issue32550@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
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). |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2018-01-14 12:30:18 | serhiy.storchaka | set | recipients: + serhiy.storchaka, gvanrossum, Mark.Shannon, yselivanov, levkivskyi |
| 2018-01-14 12:30:18 | serhiy.storchaka | set | messageid: <1515933018.1.0.467229070634.issue32550@psf.upfronthosting.co.za> |
| 2018-01-14 12:30:18 | serhiy.storchaka | link | issue32550 messages |
| 2018-01-14 12:30:17 | serhiy.storchaka | create | |