aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fuzzycat/cluster.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/fuzzycat/cluster.py b/fuzzycat/cluster.py
index 3d39a91..075366b 100644
--- a/fuzzycat/cluster.py
+++ b/fuzzycat/cluster.py
@@ -84,7 +84,7 @@ def cut(f=0, sep='\t'):
"""
def func(value):
parts = value.strip().split(sep)
- if len(parts) + 1 < f:
+ if f >= len(parts):
raise ValueError('cannot split value into {} parts'.format(f))
return parts[f]