<commit_before># Package:  core
# Date:     2nd April 2006
# Author:   <NAME>, prologic at shortcircuit dot net dot au

"""Core Building Blocks

This package contains the most basic building blocks of all Components.
"""

import os
import new
import time
from itertools import chain
from threading import Thread
from collections import deque
from operator import attrgetter
from sys import exc_info as _exc_info
from sys import exc_clear as _exc_clear
from inspect import getargspec, getmembers

if os.name == "posix":
    from signal import signal, SIGHUP, SIGINT, SIGTERM
elif os.name in ["nt", "java"]:
    from signal import signal, SIGINT, SIGTERM
else:
    raise RuntimeError("Unsupported platform '%s'" % os.name)

try:
    from multiprocessing import Process
    from multiprocessing import current_process as process
    from multiprocessing import active_children as processes
    HAS_MULTIPROCESSING = 2
except:
    try:
        from processing import Process
        from processing import currentProcess as process
        from processing import activeChildren as processes
        HAS_MULTIPROCESSING = 1
    except:
        HAS_MULTIPROCESSING = 0

from circuits.tools import reprhandler, findroot

class Event(object):
    """Create a new Event Object

    Create a new Event Object populating it with the given list of arguments
    and keyword arguments.

    @ivar name:    The name of the Event
    @ivar channel: The channel this Event is bound for
    @ivar target:  The target Component this Event is bound for
    @ivar success: A function, event or channel to use for Event success
    @ivar failure: A function, event or channel to use for Event failure

    @param args: list of arguments
    @type  args: tuple

    @param kwargs: dct of keyword arguments
    @type  kwargs: dict
    """
<commit_msg>core: Added note that 'success'/'failure' attributes of an Event object are optional and by default None (no Event handler feedback).<commit_after># Package:  core
# Date:     2nd April 2006
# Author:   <NAME>, prologic at shortcircuit dot net dot au

"""Core Building Blocks

This package contains the most basic building blocks of all Components.
"""

import os
import new
import time
from itertools import chain
from threading import Thread
from collections import deque
from operator import attrgetter
from sys import exc_info as _exc_info
from sys import exc_clear as _exc_clear
from inspect import getargspec, getmembers

if os.name == "posix":
    from signal import signal, SIGHUP, SIGINT, SIGTERM
elif os.name in ["nt", "java"]:
    from signal import signal, SIGINT, SIGTERM
else:
    raise RuntimeError("Unsupported platform '%s'" % os.name)

try:
    from multiprocessing import Process
    from multiprocessing import current_process as process
    from multiprocessing import active_children as processes
    HAS_MULTIPROCESSING = 2
except:
    try:
        from processing import Process
        from processing import currentProcess as process
        from processing import activeChildren as processes
        HAS_MULTIPROCESSING = 1
    except:
        HAS_MULTIPROCESSING = 0

from circuits.tools import reprhandler, findroot

class Event(object):
    """Create a new Event Object

    Create a new Event Object populating it with the given list of arguments
    and keyword arguments.

    @ivar name:    The name of the Event
    @ivar channel: The channel this Event is bound for
    @ivar target:  The target Component this Event is bound for
    @ivar success: An optional channel to use for Event handler success
    @ivar failure: An optional channel to use for Event handler failure

    @param args: list of arguments
    @type  args: tuple

    @param kwargs: dct of keyword arguments
    @type  kwargs: dict
    """

{'fraction_non_alphanumeric': 0.049019607843137254, 'fraction_numerical': 0.0042395336512983575, 'mean_word_length': 3.6036585365853657, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 5, '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': '5492092', 'n_tokens_mistral': 1029, 'n_tokens_neox': 997, 'n_words': 483}