import string


def get_pool(argp):
    """
    Returns a pool of characters used for randomisation. 
    """
    ret = argp.pool
    if argp.alph:
        ret += string.ascii_letters
    if argp.num:
        ret += string.digits
    if argp.alphlow:
        ret += string.ascii_lowercase
    if argp.alphup:
        ret += string.ascii_uppercase
    if argp.punc:
        ret += string.punctuation
    if not ret:
        ret += string.ascii_letters + string.digits + string.punctuation
    return "".join(set(ret))