]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40528: fix is_simple(sum)s behavior for attributes (GH-26918)
authorBatuhan Taskaya <batuhan@python.org>
Sun, 27 Jun 2021 14:58:32 +0000 (17:58 +0300)
committerGitHub <noreply@github.com>
Sun, 27 Jun 2021 14:58:32 +0000 (17:58 +0300)
commit107a2c59c91b3911bdd6dfdb83271c588c506a5a
tree77d8a1c089b367f734ee46f549940ed01eb7191e
parent9eea201b7c39a69afa2a7978dde40266104154f5
bpo-40528: fix is_simple(sum)s behavior for attributes (GH-26918)

This is something I noticed while (now discontinued) experimenting
with the idea of annotating operators with location information. Unfortunately
without this addition, adding any `attributes` to stuff like `unaryop`
doesn't change anything since the code assumes they are singletons and
caches all instances. This patch fixes this assumption with including
the attributes as well as constructor fields.
Parser/asdl_c.py