import re


def sourceSplit(source):
    """sourceSplit(source) -> str, str, str

    Split the given source into it's parts.

    source must be of the form: nick!ident@host

    Example:
    >>> nick, ident, host, = sourceSplit("Joe!Blogs@localhost")
    """

    m = re.match(
            "(?P<nick>[^!].*)!(?P<ident>.*)@(?P<host>.*)",
            source)

    if m is not None:
        d = m.groupdict()
        return d["nick"], d["ident"], d["host"]
    else:
        return source, None, None