What are your thoughts about how many and which type of errors should be caught and handled within functions, especially roll-your-own utility functions?
For example: suppose I have a function that removes a directory and all subdirectories and files underneath it. Should that function test for path existence? OR, should it simply allow whatever exceptions to be raised if the caller fails to properly check?
The packaged modules in Python seem to do some of each, so I'm fuddled.