Mercurial > public > mercurial-scm > hg
comparison mercurial/util.py @ 17425:e95ec38f86b0
fix wording and not-completely-trivial spelling errors and bad docstrings
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Wed, 15 Aug 2012 22:39:18 +0200 |
parents | e7cfe3587ea4 |
children | 31f32a96e1e3 |
comparison
equal
deleted
inserted
replaced
17424:e7cfe3587ea4 | 17425:e95ec38f86b0 |
---|---|
1475 _hexdig = '0123456789ABCDEFabcdef' | 1475 _hexdig = '0123456789ABCDEFabcdef' |
1476 _hextochr = dict((a + b, chr(int(a + b, 16))) | 1476 _hextochr = dict((a + b, chr(int(a + b, 16))) |
1477 for a in _hexdig for b in _hexdig) | 1477 for a in _hexdig for b in _hexdig) |
1478 | 1478 |
1479 def _urlunquote(s): | 1479 def _urlunquote(s): |
1480 """unquote('abc%20def') -> 'abc def'.""" | 1480 """Decode HTTP/HTML % encoding. |
1481 | |
1482 >>> _urlunquote('abc%20def') | |
1483 'abc def' | |
1484 """ | |
1481 res = s.split('%') | 1485 res = s.split('%') |
1482 # fastpath | 1486 # fastpath |
1483 if len(res) == 1: | 1487 if len(res) == 1: |
1484 return s | 1488 return s |
1485 s = res[0] | 1489 s = res[0] |