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 steven.daprano
Recipients Dennis Sweeney, mark.dickinson, serhiy.storchaka, steven.daprano, terry.reedy
Date 2022-01-16.09:51:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20220116094607.GG16660@ando.pearwood.info>
In-reply-to <1642323008.02.0.562629754476.issue46393@roundup.psfhosted.org>
Content
That's not always the case though. 

>>> def f():
...     return frozenset({1, 2, 3})
... 
>>> a = f.__code__.co_consts[1]
>>> a
frozenset({1, 2, 3})
>>> b = f()
>>> assert a == b
>>> a is b
False

Also see the disassembly I posted on Python-Ideas.
History
Date User Action Args
2022-01-16 09:51:14steven.dapranosetrecipients: + steven.daprano, terry.reedy, mark.dickinson, serhiy.storchaka, Dennis Sweeney
2022-01-16 09:51:14steven.dapranolinkissue46393 messages
2022-01-16 09:51:14steven.dapranocreate