diff --git a/ldapserver/ldap.py b/ldapserver/ldap.py
index 238b9bcdfa05a7063bf01ce4cbaa2ad7f5618f2b..8fdb990c50103aed37309cbceedbdc1f9f81751d 100644
--- a/ldapserver/ldap.py
+++ b/ldapserver/ldap.py
@@ -287,14 +287,14 @@ class FilterExtensibleMatch(asn1.Sequence, Filter):
 	dnAttributes: bool
 
 	def __str__(self):
-		parts = []
+		key = ''
 		if self.type is not None:
-			parts.append(self.type)
+			key += self.type
 		if self.dnAttributes:
-			parts.append('dn')
+			key += ':dn'
 		if self.matchingRule is not None:
-			parts.append(self.matchingRule)
-		return '(%s:=%s)'%(':'.join(parts), escape_filter_assertionvalue(self.matchValue))
+			key += ':' + self.matchingRule
+		return '(%s:=%s)'%(key, escape_filter_assertionvalue(self.matchValue))
 
 class SearchScope(enum.Enum):
 	''':any:`enum.Enum` of `scope` values in SEARCH operations'''