#NEWLINE# def clear( self , domain = None , path = None , name = None ) : #NEWLINE# #INDENT# 'Clear some cookies.\n\n        Invoking this method without arguments will clear all cookies.  If\n        given a single argument, only cookies belonging to that domain will be\n        removed.  If given two arguments, cookies belonging to the specified\n        path within that domain are removed.  If given three arguments, then\n        the cookie with the specified name, path and domain is removed.\n\n        Raises KeyError if no matching cookie exists.\n\n        ' #NEWLINE# if ( name is not None ) : #NEWLINE# #INDENT# if ( ( domain is None ) or ( path is None ) ) : #NEWLINE# #INDENT# raise ValueError ( 'domain and path must be given to remove a cookie by name' ) #NEWLINE# #UNINDENT# del self . _cookies [ domain ] [ path ] [ name ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( path is not None ) : #NEWLINE# #INDENT# if ( domain is None ) : #NEWLINE# #INDENT# raise ValueError ( 'domain must be given to remove cookies by path' ) #NEWLINE# #UNINDENT# del self . _cookies [ domain ] [ path ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( domain is not None ) : #NEWLINE# #INDENT# del self . _cookies [ self ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _cookies = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# }