Message339346
| Author | rhettinger |
|---|---|
| Recipients | george-shuklin, rhettinger |
| Date | 2019-04-02.15:12:54 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1554217974.51.0.0996059761137.issue36507@roundup.psfhosted.org> |
| In-reply-to |
| Content | |
|---|---|
The code in the minimal example isn't creating nested frozensets. Instead, if is converting one frozenset into another (because frozenset takes an iterable as an argument). This is no different than list(list(list())) producing a single list rather than a nested list.
Here's how to build nested frozensets:
>>> x = frozenset({})
>>> y = frozenset({x})
>>> z = frozenset({y})
>>> x
frozenset()
>>> y
frozenset({frozenset()})
>>> z
frozenset({frozenset({frozenset()})})
>>> x is y
False
>>> x == y
False |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2019-04-02 15:12:54 | rhettinger | set | recipients: + rhettinger, george-shuklin |
| 2019-04-02 15:12:54 | rhettinger | set | messageid: <1554217974.51.0.0996059761137.issue36507@roundup.psfhosted.org> |
| 2019-04-02 15:12:54 | rhettinger | link | issue36507 messages |
| 2019-04-02 15:12:54 | rhettinger | create | |