<commit_before># <NAME> <<EMAIL>>

##____________________________________________________________________________||
class Events(object):
    def __init__(self, tree, maxEvents = -1):
        self.file = tree.GetDirectory() # so a file won't close
        self.tree = tree
        self.nEvents = min(self.tree.GetEntries(), maxEvents) if (maxEvents > -1) else self.tree.GetEntries()

    def __iter__(self):
        iEvent = 0
        while iEvent < self.nEvents:
            if self.tree.GetEntry(iEvent) <= 0: return
            iEvent += 1
            yield self

    def __getattr__(self, name):
        return getattr(self.tree, name)

##____________________________________________________________________________||
if __name__ == '__main__':
    pass
<commit_msg>make iEvent a member variable<commit_after># <NAME> <<EMAIL>>

##____________________________________________________________________________||
class Events(object):
    def __init__(self, tree, maxEvents = -1):
        self.file = tree.GetDirectory() # so a file won't close
        self.tree = tree
        self.nEvents = min(self.tree.GetEntries(), maxEvents) if (maxEvents > -1) else self.tree.GetEntries()

    def __iter__(self):
        self.iEvent = 0
        while self.iEvent < self.nEvents:
            if self.tree.GetEntry(self.iEvent) <= 0: return
            self.iEvent += 1
            yield self

    def __getattr__(self, name):
        return getattr(self.tree, name)

##____________________________________________________________________________||
if __name__ == '__main__':
    pass

{'fraction_non_alphanumeric': 0.10786802030456853, 'fraction_numerical': 0.006345177664974619, 'mean_word_length': 3.2053333333333334, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, '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': '2929535', 'n_tokens_mistral': 422, 'n_tokens_neox': 409, 'n_words': 108}