def create_cookie(name, value, **kwargs):
 result = dict(version=0, name=name, value=value, port=None, domain='', path='/', secure=False, expires=None, discard=True, comment=None, comment_url=None, rest={'HttpOnly': None}, rfc2109=False)
 badargs = (set(kwargs) - set(result))
 if badargs:
  err = 'create_cookie() got unexpected keyword arguments: %s'
  raise TypeError((err % list(badargs)))
 result.update(kwargs)
 result['port_specified'] = bool(result['port'])
 result['domain_specified'] = bool(result['domain'])
 result['domain_initial_dot'] = result['domain'].startswith('.')
 result['path_specified'] = bool(result['path'])
 return cookielib.Cookie(**result)

def create_cookie ( name , value , ** kwargs ) : result = dict ( version = 0 , name = name , value = value , port = None , domain = '' , path = '/' , secure = False , expires = None , discard = True , comment = None , comment_url = None , rest = { 'HttpOnly' : None } , rfc2109 = False ) badargs = ( set ( kwargs ) - set ( result ) ) if badargs : err = 'create_cookie() got unexpected keyword arguments: %s' raise TypeError ( ( err % list ( badargs ) ) ) result . update ( kwargs ) result [ 'port_specified' ] = bool ( result [ 'port' ] ) result [ 'domain_specified' ] = bool ( result [ 'domain' ] ) result [ 'domain_initial_dot' ] = result [ 'domain' ] . startswith ( '.' ) result [ 'path_specified' ] = bool ( result [ 'path' ] ) return cookielib . Cookie ( ** result )
make a cookie from underspecified parameters .