Simplifies comparison statements in encoding.py

This commit is contained in:
Robert Smallshire
2015-05-07 13:49:38 +02:00
parent edd1fce166
commit b52ea4cff6
+2 -2
View File
@@ -64,10 +64,10 @@ def guess_encoding(bs, threshold=0.5):
if null_freq == 1.0:
return ASCII # Doesn't matter
if ebcdic_freq < threshold and ascii_freq >= threshold:
if ebcdic_freq < threshold <= ascii_freq:
return ASCII
if ebcdic_freq >= threshold and ascii_freq < threshold:
if ebcdic_freq >= threshold > ascii_freq:
return EBCDIC
if ebcdic_freq < threshold and ascii_freq < threshold: