def _get_on_name(self, func):
        r = re.match("^on_(.+)$", func.__name__)
        if r:
            event = r.group(1)
        else:
            raise ValueError("The function name should be "
                             "`on_<eventname>`().")
        return event
Case-insensitive check for a header.
dataset/ETHPy150Open kwikteam/phy/phy/utils/event.py/EventEmitter._get_on_name--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.2/django/http/__init__.py/HttpResponse.has_header