diff --git a/synapse/appservice/__init__.py b/synapse/appservice/__init__.py
index 5be5120c91563d97a3af69e6a79e92614fa39a6c..fbb4e4420617f1a6b94e6028395b78a61270ad0b 100644
--- a/synapse/appservice/__init__.py
+++ b/synapse/appservice/__init__.py
@@ -275,11 +275,11 @@ class ApplicationService(object):
     def get_groups_for_user(self, user_id):
         """Get the groups that this user is associated with by this AS
         """
-        return [
+        return (
             regex_obj["group_id"]
             for regex_obj in self.namespaces[ApplicationService.NS_USERS]
             if "group_id" in regex_obj and regex_obj["regex"].match(user_id)
-        ]
+        )
 
     def is_rate_limited(self):
         return self.rate_limited