def _level_name_to_number(self, name):
    '\n        Convert the given user level to a number\n\n        :param name: Level name\n        :return: A number between 0 and Infinity, higher number is higher\n                 user level\n        :raise ValueError: In case of invalid user level\n        '
    levels = ['user', 'reg', 'mod', 'owner']
    if (not (name in levels)):
        raise ValueError(u'{0} is not a valid user level'.format(name))
    return levels.index(name)
Convert the given user level to a number

:param name: Level name
:return: A number between 0 and Infinity, higher number is higher
         user level
:raise ValueError: In case of invalid user level
def _level_name_to_number(self, name):
    '\n        Convert the given user level to a number\n\n        :param name: Level name\n        :return: A number between 0 and Infinity, higher number is higher\n                 user level\n        :raise ValueError: In case of invalid user level\n        '
    levels = ['user', 'reg', 'mod', 'owner']
    if (not (name in levels)):
        raise ValueError(u'{0} is not a valid user level'.format(name))
    return levels.index(name)