bpo-40521: Empty frozenset is no longer a singleton (GH-21085)

* Revert "bpo-40521: Make the empty frozenset per interpreter (GH-21068)"

This reverts commit 261cfedf76.

* bpo-40521: Empty frozensets are no longer singletons

* Complete the removal of the frozenset singleton
This commit is contained in:
Raymond Hettinger 2020-06-23 08:42:55 -07:00 committed by GitHub
parent 522691c46e
commit f9bd05e83e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 8 additions and 54 deletions

View file

@ -661,15 +661,6 @@ class TestFrozenSet(TestJointOps, unittest.TestCase):
s.__init__(self.otherword)
self.assertEqual(s, set(self.word))
def test_singleton_empty_frozenset(self):
f = frozenset()
efs = [frozenset(), frozenset([]), frozenset(()), frozenset(''),
frozenset(), frozenset([]), frozenset(()), frozenset(''),
frozenset(range(0)), frozenset(frozenset()),
frozenset(f), f]
# All of the empty frozensets should have just one id()
self.assertEqual(len(set(map(id, efs))), 1)
def test_constructor_identity(self):
s = self.thetype(range(3))
t = self.thetype(s)