def party_list(name, age, sex):
    """
    :name:"{}" != "Dad"
    :age:17< {} <25
    :sex:True
    """
print("You're invited to my party, {}!".format(name))
keys = ['name', 'age', 'sex']
values = [['John', 24, 'Male'], ['Sarah', 25, 'Female'], ['Pikachu', 2,
    'Pokemon'], ['Pizza guy', 18, 'Male']]
for key, value in enumerate(values):
    values[key] = {t: p for t, p in zip(keys, value)}
conditions = list([c for c in party_list.__doc__.split('\n') if ':' in c])
for friend in values:
    for case in conditions:
        tag, code = case.split(':')[1:]
if not eval(code.format(friend[tag])):
    break
else:
    party_list(friend['name'], friend['age'], friend['sex'])
Pattern matching on function parameters in Python