1
0

Don't ban __iter__

This commit is contained in:
Erik Johnston
2021-03-26 17:45:09 +00:00
parent f38350fdda
commit c4d468b69f
+2 -2
View File
@@ -231,8 +231,8 @@ class DomainSpecificString(
# Deny iteration because it will bite you if you try to create a singleton
# set by:
# users = set(user)
def __iter__(self):
raise ValueError("Attempted to iterate a %s" % (type(self).__name__,))
# def __iter__(self):
# raise ValueError("Attempted to iterate a %s" % (type(self).__name__,))
# Because this class is a namedtuple of strings and booleans, it is deeply
# immutable.