diff options
author | Tim Peters <tim.peters@gmail.com> | 2003-04-24 16:02:54 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2003-04-24 16:02:54 (GMT) |
commit | 0eadaac7dc3ae49974c105ff9e8c1e98a04d7d5a (patch) | |
tree | 6d84cc9f2da9f24dd76871e75a80e618fd519a27 /Lib/encodings/punycode.py | |
parent | 0822ff7ccab0465cf4377176089dfdbabbd0a35b (diff) | |
download | cpython-0eadaac7dc3ae49974c105ff9e8c1e98a04d7d5a.zip cpython-0eadaac7dc3ae49974c105ff9e8c1e98a04d7d5a.tar.gz cpython-0eadaac7dc3ae49974c105ff9e8c1e98a04d7d5a.tar.bz2 |
Whitespace normalization.
Diffstat (limited to 'Lib/encodings/punycode.py')
-rw-r--r-- | Lib/encodings/punycode.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/encodings/punycode.py b/Lib/encodings/punycode.py index e7f2d45..82fd458 100644 --- a/Lib/encodings/punycode.py +++ b/Lib/encodings/punycode.py @@ -9,7 +9,7 @@ import codecs ##################### Encoding ##################################### def segregate(str): - """3.1 Basic code point segregation""" + """3.1 Basic code point segregation""" base = [] extended = {} for c in str: @@ -66,7 +66,7 @@ def insertion_unsort(str, extended): oldindex = index delta = 0 oldchar = char - + return result def T(j, bias): @@ -103,7 +103,7 @@ def adapt(delta, first, numchars): divisions += 36 bias = divisions + (36 * delta // (delta + 38)) return bias - + def generate_integers(baselen, deltas): """3.4 Bias adaptation""" @@ -155,7 +155,7 @@ def decode_generalized_number(extended, extpos, bias, errors): return extpos, result w = w * (36 - t) j += 1 - + def insertion_sort(base, extended, errors): """3.2 Insertion unsort coding""" @@ -193,7 +193,7 @@ def punycode_decode(text, errors): base = unicode(base, "ascii", errors) extended = extended.upper() return insertion_sort(base, extended, errors) - + ### Codec APIs class Codec(codecs.Codec): |