Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python raise TypeError

def prefill(n,v):
    try:
        n = int(n)
    except ValueError:
        raise TypeError("{0} is invalid".format(n))
    else:
        return [v] * n
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #raise #TypeError
ADD COMMENT
Topic
Name
3+1 =