def _default_hashfunc(content, hashbits):
    "\n    Default hash function is variable-length version of Python's builtin hash.\n\n    :param content: data that needs to hash.\n    :return: return a decimal number.\n    "
    if (content == ''):
        return 0
    x = (ord(content[0]) << 7)
    m = 1000003
    mask = ((2 ** hashbits) - 1)
    for c in content:
        x = (((x * m) ^ ord(c)) & mask)
    x ^= len(content)
    if (x == (- 1)):
        x = (- 2)
    return x
Default hash function is variable-length version of Python's builtin hash.

:param content: data that needs to hash.
:return: return a decimal number.
def _default_hashfunc(content, hashbits):
    "\n    Default hash function is variable-length version of Python's builtin hash.\n\n    :param content: data that needs to hash.\n    :return: return a decimal number.\n    "
    if (content == ):
        return 0
    x = (ord(content[0]) << 7)
    m = 1000003
    mask = ((2 ** hashbits) - 1)
    for c in content:
        x = (((x * m) ^ ord(c)) & mask)
    x ^= len(content)
    if (x == (- 1)):
        x = (- 2)
    return x