def get_longest_key(tuple_of_tuples):
    """
    Why is this needed? Because sometimes we want to know how long a CharField
    should be -- so let's have it as long as the longest choice available.
    (For example, when we have a radio button and we want to store a single value.)

    INPUT=(
        ('short', 'blahblahblah'),
        ('longer', 'blahblahblah'),
        ('longest', 'blahblahblah')
    )
    OUTPUT=len(longest)

    USAGE:
    BLAH_CHOICES=(...)
    blah=CharField(max_length=get_longest_key(BLAH_CHOICES))
    """
    return max(len(i) for i in dict(tuple_of_tuples).values())