<commit_before><commit_msg>first commit<commit_after>class Pointer(object):
    def __init__(self):
        self._pair = None

    def set_pair(self, pair):
        self._pair = pair

    def get_pair(self):
        return self._pair

    pair = property(get_pair, set_pair)

    def exe(self):
        def f():
            for p in self.expr._agenda:
                print 'p = {0}'.format(p)
                self.pair = getattr(self, p)
            return self.pair
        return f

    @property
    def l(self):
        return self.pair[0]

    @property
    def r(self):
        return self.pair[1]

class PointerBuilder(object):
    def __init__(self):
        self._agenda = []

    @property
    def l(self):
        self._agenda.append("l")
        return self

    @property
    def r(self):
        self._agenda.append("r")
        return self



pair = (('foo', 'bar'), 'baz')

pb = PointerBuilder()
expr = pb.l.r

ptr = Pointer()
ptr.pair = pair
ptr.expr = expr
print "Expr agenda {0}".format(ptr.expr._agenda)
f = ptr.exe()
print f
p = f()
print "resuls = {0}".format(p)
{'fraction_non_alphanumeric': 0.1336405529953917, 'fraction_numerical': 0.004608294930875576, 'mean_word_length': 2.076487252124646, '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': '553362', 'n_tokens_mistral': 370, 'n_tokens_neox': 356, 'n_words': 91}