Is it safe to use the python word “type” in my code?

Using type as a keyword argument to a function will mask the built-in function “type” within the scope of the function. So while doing so does not raise a SyntaxError, it is not considered good practice, and I would avoid doing so.

Leave a Comment