Replaces the manually constructed loop with a call to `dict.update`
"samesite" : "SameSite",
}
+ _reserved_defaults = dict.fromkeys(_reserved, "")
+
_flags = {'secure', 'httponly'}
def __init__(self):
self._key = self._value = self._coded_value = None
# Set default attributes
- for key in self._reserved:
- dict.__setitem__(self, key, "")
+ dict.update(self, self._reserved_defaults)
@property
def key(self):
--- /dev/null
+Improved performances of creating :py:class:`~http.cookies.Morsel` objects by a factor of 3.8x.