MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / delete_cookie

Method delete_cookie

21-async/mojifinder/bottle.py:1651–1656  ·  view source on GitHub ↗

Delete a cookie. Be sure to use the same `domain` and `path` settings as used to create the cookie.

(self, key, **kwargs)

Source from the content-addressed store, hash-verified

1649 self._cookies[name][key.replace('_', '-')] = value
1650
1651 def delete_cookie(self, key, **kwargs):
1652 ''' Delete a cookie. Be sure to use the same `domain` and `path`
1653 settings as used to create the cookie. '''
1654 kwargs['max_age'] = -1
1655 kwargs['expires'] = 0
1656 self.set_cookie(key, '', **kwargs)
1657
1658 def __repr__(self):
1659 out = ''

Callers

nothing calls this directly

Calls 1

set_cookieMethod · 0.95

Tested by

no test coverage detected