web/http_headers.py
changeset 10669 155c29e0ed1c
parent 10662 10942ed172de
child 10778 04d248305810
equal deleted inserted replaced
10668:4fb62d791073 10669:155c29e0ed1c
   360         return val[0], val[2]
   360         return val[0], val[2]
   361     raise ValueError("Expected key or key=value, but got %s." % (val,))
   361     raise ValueError("Expected key or key=value, but got %s." % (val,))
   362 
   362 
   363 def parseArgs(field):
   363 def parseArgs(field):
   364     args = split(field, Token(';'))
   364     args = split(field, Token(';'))
   365     val = args.next()
   365     val = next(args)
   366     args = [parseKeyValue(arg) for arg in args]
   366     args = [parseKeyValue(arg) for arg in args]
   367     return val, args
   367     return val, args
   368 
   368 
   369 def listParser(fun):
   369 def listParser(fun):
   370     """Return a function which applies 'fun' to every element in the
   370     """Return a function which applies 'fun' to every element in the