From c4a2e8843678e00bdbdaf9d2e4e8441a4afab626 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Thu, 15 Mar 2018 16:49:41 -0400 Subject: [PATCH] slots on headerdict Signed-off-by: Kenneth Reitz --- requests/structures.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/requests/structures.py b/requests/structures.py index f49ccdcf..59d4645e 100644 --- a/requests/structures.py +++ b/requests/structures.py @@ -38,6 +38,8 @@ class CaseInsensitiveDict(collections.MutableMapping): behavior is undefined. """ + __slots__ = ('_store') + def __init__(self, data=None, **kwargs): self._store = collections.OrderedDict() if data is None: @@ -96,7 +98,7 @@ class HTTPHeaderDict(CaseInsensitiveDict): self.extend({} if data is None else data, **kwargs) - # + # # We'll store tuples in the internal dictionary, but present them as a # concatenated string when we use item access methods. #