Message410688
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. |
|
Date |
User |
Action |
Args |
2022-01-16 09:51:14 | steven.daprano | set | recipients:
+ steven.daprano, terry.reedy, mark.dickinson, serhiy.storchaka, Dennis Sweeney |
2022-01-16 09:51:14 | steven.daprano | link | issue46393 messages |
2022-01-16 09:51:14 | steven.daprano | create | |
|