<commit_before>from __pyjamas__ import JS

class Element:
    def __init__(self, tag=None, element=None):
        if tag != None:
            JS('''
            this.element = $doc.createElement(tag);
            ''')
        elif element != None:
            self.element = element
        else:
            raise Exception
        
        self.element.__ref = self;
        self.activeEvents = []

    def append(self, element):
        JS('''
        this.element.appendChild(element.element);
        ''')

    def prepend(self, element):
        JS('''
        this.element.insertBefore(element.element, self.element.firstChild);
        ''')
<commit_msg>A bit more informational error<commit_after>from __pyjamas__ import JS

class Element:
    def __init__(self, tag=None, element=None):
        if tag != None:
            JS('''
            this.element = $doc.createElement(tag);
            ''')
        elif element != None:
            self.element = element
        else:
            raise Exception("Cannot create Element without tag or element")
        
        self.element.__ref = self;
        self.activeEvents = []

    def append(self, element):
        JS('''
        this.element.appendChild(element.element);
        ''')

    def prepend(self, element):
        JS('''
        this.element.insertBefore(element.element, self.element.firstChild);
        ''')

{'fraction_non_alphanumeric': 0.12112472963229992, 'fraction_numerical': 0.0, 'mean_word_length': 1.8977035490605427, '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': '4901543', 'n_tokens_mistral': 375, 'n_tokens_neox': 369, 'n_words': 86}