import re


def extract_mentions(tweet):
    """Extract all mentions ['@foo', '@bar'] from a tweet"""
    if "retweeted_status" in tweet:
        text = tweet["text"].replace('@', '', 1)  #discard heading @ in retweeted text 'RT @...'
    else:
        text = tweet["text"]
    exp = re.compile(r"@\w+")
    return exp.findall(text)