From 6f2a45d77a82a34d20ba1bd21246d0ef0433faea Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Tue, 27 Mar 2018 15:43:30 +0200 Subject: [PATCH] Lib: Add __slots__ to cidict and LDAPUrlExtensions --- Lib/ldap/cidict.py | 1 + Lib/ldapurl.py | 1 + 2 files changed, 2 insertions(+) diff --git a/Lib/ldap/cidict.py b/Lib/ldap/cidict.py index 3dcfe48..cf13388 100644 --- a/Lib/ldap/cidict.py +++ b/Lib/ldap/cidict.py @@ -15,6 +15,7 @@ class cidict(MutableMapping): """ Case-insensitive but case-respecting dictionary. """ + __slots__ = ('_keys', '_data') def __init__(self, default=None): self._keys = {} diff --git a/Lib/ldapurl.py b/Lib/ldapurl.py index 7ed1d8a..ecfc539 100644 --- a/Lib/ldapurl.py +++ b/Lib/ldapurl.py @@ -137,6 +137,7 @@ class LDAPUrlExtensions(MutableMapping): Models a collection of LDAP URL extensions as a mapping type """ + __slots__ = ('_data', ) def __init__(self, default=None): self._data = {}