From c4d468b69fe6bb44dbd1d28aaf9200511c63eb49 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 26 Mar 2021 17:45:09 +0000 Subject: Don't ban __iter__ --- synapse/types.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/synapse/types.py b/synapse/types.py index b08ce90140..5f54b0bd9b 100644 --- a/synapse/types.py +++ b/synapse/types.py @@ -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. -- cgit 1.4.1