def bin2int(bin_string):
    """Convert binary number string to decimal integer.
    
    Note: Python > v2 has int(bin_string, 2)

    >>> bin2int('1111')
    15

    >>> bin2int('0101')
    5

    """
##     result = 0
##     bin_list = list(bin_string)
##     if len(filter(lambda x: x in ('1','0'), bin_list)) < len(bin_list):
##         raise Exception ("bin2int: Error - not a binary number: %s"
##                          % bin_string)
##     bit_list = map(int, bin_list)
##     bit_list.reverse()  # Make most significant bit have highest index.
##     for bit_place in range(len(bit_list)):
##         result = result + ((2**bit_place) * bit_list[bit_place])
##     return result
    return int(bin_string, 2)