
#242 from lib import * but less
Python Bytes
00:00
How to Get a Type Error in Python?
If you do a string times a number, you get a pretty interesting outcome. If you pass in something that does not match the type innitations described, it'll say, it'll raise a type mismatch exception. And this can be nested down. So for example, one of the examples is it takes a list. And, let's see, takes a a list, which is a union of strings, ints and tupls. But if you give it some other type, like a list that happens to contain one of the elements as a day time, it'll give you this exception. It has, you know, like the transitive sort of property of analizing the types
Transcript
Play full episode