Dict-like __setitem__ for compatibility with client code. Throws exception if there is already a cookie of that name in the jar. In that case, use the more explicit set() method instead.
(
self, name: str, value: str | Morsel[dict[str, str]] | None
)
| 365 | return self._find_no_duplicates(name) |
| 366 | |
| 367 | def __setitem__( |
| 368 | self, name: str, value: str | Morsel[dict[str, str]] | None |
| 369 | ) -> None: |
| 370 | """Dict-like __setitem__ for compatibility with client code. Throws |
| 371 | exception if there is already a cookie of that name in the jar. In that |
| 372 | case, use the more explicit set() method instead. |
| 373 | """ |
| 374 | self.set(name, value) |
| 375 | |
| 376 | def __delitem__(self, name: str) -> None: |
| 377 | """Deletes a cookie given a name. Wraps ``http.cookiejar.CookieJar``'s |