comparison roundup/cgi/accept_language.py @ 4362:74476eaac38a

more modernisation
author Richard Jones <richard@users.sourceforge.net>
date Fri, 26 Feb 2010 00:38:53 +0000
parents 52f89836d05b
children b00cd44fea16
comparison
equal deleted inserted replaced
4360:661466ba19cd 4362:74476eaac38a
33 # regexp for languange-range search with quality value 33 # regexp for languange-range search with quality value
34 qlre = "([A-Za-z]+[-[A-Za-z]+]*);q=([\d\.]+)" 34 qlre = "([A-Za-z]+[-[A-Za-z]+]*);q=([\d\.]+)"
35 # both 35 # both
36 lre = re.compile(nqlre + "|" + qlre) 36 lre = re.compile(nqlre + "|" + qlre)
37 37
38 ascii = ''.join([chr(x) for x in xrange(256)]) 38 ascii = ''.join([chr(x) for x in range(256)])
39 whitespace = ' \t\n\r\v\f' 39 whitespace = ' \t\n\r\v\f'
40 40
41 def parse(language_header): 41 def parse(language_header):
42 """parse(string_with_accept_header_content) -> languages list""" 42 """parse(string_with_accept_header_content) -> languages list"""
43 43

Roundup Issue Tracker: http://roundup-tracker.org/