Skip to main content
3 events
when toggle format what by license comment
Jun 30, 2013 at 2:18 comment added detly @krishnab - Yep. Just document the requirements for your code, and read the documentation of others, and you should be fine. Sometimes you'd consider raising a ValueError on certain kinds of invalid inputs, eg. trying to do a std dev on a list of one. But those are fairly rare cases, and aren't so much to do with type checking as input validation.
Jun 30, 2013 at 1:25 comment added krishnab I think I get it. So there is a compromise between accepting valid numeric inputs that enter in different types of containers, versus trying to catch every possible type of error. That helps a lot. Thanks.
Jun 29, 2013 at 5:16 history answered detly CC BY-SA 3.0