summaryrefslogtreecommitdiff
path: root/cliff/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'cliff/utils.py')
-rw-r--r--cliff/utils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/cliff/utils.py b/cliff/utils.py
index a9ee975..0da9b42 100644
--- a/cliff/utils.py
+++ b/cliff/utils.py
@@ -13,6 +13,7 @@
import codecs
import ctypes
+import inspect
import os
import struct
import sys
@@ -28,6 +29,12 @@ import six
COST = {'w': 0, 's': 2, 'a': 1, 'd': 3}
+if hasattr(inspect, 'getfullargspec'):
+ getargspec = inspect.getfullargspec
+else:
+ getargspec = inspect.getargspec
+
+
def damerau_levenshtein(s1, s2, cost):
"""Calculates the Damerau-Levenshtein distance between two strings.