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

import sys
from boscli import exceptions
from boscli import parser as parser_module
from boscli import filters


class Context(object):

    def __init__(self, context_name, prompt=None):
        self.context_name = context_name
        self.prompt = prompt if prompt else self.context_name
        self.data = {}

    def is_default(self):
        return False

    def has_name(self, context_name):
        return self.context_name == context_name

    def __str__(self):
        return "Context:%s" % self.context_name


class DefaultContext(Context):
    def __init__(self, prompt=None):
        super().__init__('Default', prompt=prompt)

    def is_default(self):
        return True

<commit_msg>[FIX] Retrocompatibility with python 2.7<commit_after># -*- coding: utf-8 -*-

import sys
from boscli import exceptions
from boscli import parser as parser_module
from boscli import filters


class Context(object):

    def __init__(self, context_name, prompt=None):
        self.context_name = context_name
        self.prompt = prompt if prompt else self.context_name
        self.data = {}

    def is_default(self):
        return False

    def has_name(self, context_name):
        return self.context_name == context_name

    def __str__(self):
        return "Context:%s" % self.context_name


class DefaultContext(Context):

    def __init__(self, prompt=None):
        super(DefaultContext, self).__init__('Default', prompt=prompt)

    def is_default(self):
        return True


{'fraction_non_alphanumeric': 0.09256844850065189, 'fraction_numerical': 0.002607561929595828, 'mean_word_length': 3.1939890710382515, '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': '5133944', 'n_tokens_mistral': 451, 'n_tokens_neox': 428, 'n_words': 125}