<commit_before>"""
TestCases for python DB Btree key comparison function.
"""

import sys, os, re
import test_all
from cStringIO import StringIO

import unittest
from bsddb3 import db

lexical_cmp = cmp

def lowercase_cmp(left, right):
    return cmp (left.lower(), right.lower())

def make_reverse_comparator (cmp):<commit_msg>fix import to work with either module name.<commit_after>"""
TestCases for python DB Btree key comparison function.
"""

import sys, os, re
import test_all
from cStringIO import StringIO

import unittest
try:
    # For Pythons w/distutils pybsddb
    from bsddb3 import db, dbshelve
except ImportError:
    # For Python 2.3
    from bsddb import db, dbshelve

lexical_cmp = cmp

def lowercase_cmp(left, right):
    return cmp (left.lower(), right.lower())

def make_reverse_comparator (cmp):
{'fraction_non_alphanumeric': 0.08180708180708181, 'fraction_numerical': 0.004884004884004884, 'mean_word_length': 4.655172413793103, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2736854', 'n_tokens_mistral': 272, 'n_tokens_neox': 269, 'n_words': 96}