<commit_before>import re
import sys
if sys.version < '2.4':
    from sets import ImmutableSet as frozenset

import six
from six.moves.urllib import parse as urlparse

from routes.util import _url_quote as url_quote, _str_encode, as_unicode


class Route(object):
    """The Route object holds a route recognition and generation
    routine.

    See Route.__init__ docs for usage.

    """
    # reserved keys that don't count
    reserved_keys = ['requirements']

    # special chars to indicate a natural split in the URL
    done_chars = ('/', ',', ';', '.', '#')

    def __init__(self, name, routepath, **kargs):
        """Initialize a route, with a given routepath for
        matching/generation

        The set of keyword args will be used as defaults.

        Usage::

            >>> from routes.base import Route<commit_msg>Remove obsolete Python 2.3 compat code<commit_after>import re
import sys

import six
from six.moves.urllib import parse as urlparse

from routes.util import _url_quote as url_quote, _str_encode, as_unicode


class Route(object):
    """The Route object holds a route recognition and generation
    routine.

    See Route.__init__ docs for usage.

    """
    # reserved keys that don't count
    reserved_keys = ['requirements']

    # special chars to indicate a natural split in the URL
    done_chars = ('/', ',', ';', '.', '#')

    def __init__(self, name, routepath, **kargs):
        """Initialize a route, with a given routepath for
        matching/generation

        The set of keyword args will be used as defaults.

        Usage::

            >>> from routes.base import Route
{'fraction_non_alphanumeric': 0.09018404907975461, 'fraction_numerical': 0.00245398773006135, 'mean_word_length': 2.9301204819277107, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 9, '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': '6837964', 'n_tokens_mistral': 473, 'n_tokens_neox': 442, 'n_words': 181}