<commit_before>import copy, time
from itertools import chain

import mal_types as types
from mal_types import List, Vector
import mal_readline
import reader
import printer

# Errors/Exceptions
def throw(exc): raise Exception(exc)


# String functions
def pr_str(*args):
    return " ".join(map(lambda exp: printer._pr_str(exp, True), args))

def do_str(*args):
    return "".join(map(lambda exp: printer._pr_str(exp, False), args))

def prn(*args):
    print(" ".join(map(lambda exp: printer._pr_str(exp, True), args)))
    return None

def println(*args):
    line = " ".join(map(lambda exp: printer._pr_str(exp, False), args))
    print(line.replace('\\n', '\n'))
    return None


# Hash map functions
def assoc(src_hm, *key_vals):
    hm = copy.copy(src_hm)
    for i in range(0,len(key_vals),2): hm[key_vals[i]] = key_vals[i+1]
    return hm

def dissoc(src_hm, *keys):
    hm = copy.copy(src_hm)
    for key in keys:
        if key in hm: del hm[key]
    return hm<commit_msg>python: Fix newline ("\n") handling<commit_after>import copy, time
from itertools import chain

import mal_types as types
from mal_types import List, Vector
import mal_readline
import reader
import printer

# Errors/Exceptions
def throw(exc): raise Exception(exc)


# String functions
def pr_str(*args):
    return " ".join(map(lambda exp: printer._pr_str(exp, True), args))

def do_str(*args):
    return "".join(map(lambda exp: printer._pr_str(exp, False), args))

def prn(*args):
    print(" ".join(map(lambda exp: printer._pr_str(exp, True), args)))
    return None

def println(*args):
    print(" ".join(map(lambda exp: printer._pr_str(exp, False), args)))
    return None


# Hash map functions
def assoc(src_hm, *key_vals):
    hm = copy.copy(src_hm)
    for i in range(0,len(key_vals),2): hm[key_vals[i]] = key_vals[i+1]
    return hm

def dissoc(src_hm, *keys):
    hm = copy.copy(src_hm)
    for key in keys:
        if key in hm: del hm[key]
    return hm
{'fraction_non_alphanumeric': 0.13545407901487944, 'fraction_numerical': 0.0030785017957927143, 'mean_word_length': 4.131578947368421, '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': '3774661', 'n_tokens_mistral': 695, 'n_tokens_neox': 688, 'n_words': 201}