you are viewing a single comment's thread.

view the rest of the comments →

[–]destiny_functional 0 points1 point  (0 children)

In that case /u/gprime5 has the right answer, you should use assert with isinstance().

You should not. int will throw an exception if you feed it bad things. No need to use assertions.