<commit_before># -*- coding: utf-8 -*-

class DocumentProperties(dict):
    pass


class Style(dict):
    def __init__(self):
        self.name = None
        

class DocumentTreeNode(object):
    def __init__(self):
        self.parent = None
        self.style = None
        self.content = list() # of DocumentTreeNode
        
    def __iadd__(self, other):
        self.content.append(other)
        return self<commit_msg>Bugfix in DocumentTreeNode - handled the situation when a derived class has a read-only "content" property<commit_after># -*- coding: utf-8 -*-

class DocumentProperties(dict):
    pass


class Style(dict):
    def __init__(self):
        self.name = None
        

class DocumentTreeNode(object):
    def __init__(self):
        self.parent = None
        self.style = None
        try:
            self.content = [] # of DocumentTreeNode
        except AttributeError:
            pass
        
    def __iadd__(self, other):
        self.content.append(other)
        return self
{'fraction_non_alphanumeric': 0.09702970297029703, 'fraction_numerical': 0.0019801980198019802, 'mean_word_length': 2.159375, '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': '5357283', 'n_tokens_mistral': 282, 'n_tokens_neox': 278, 'n_words': 76}