Tagged Questions
0
votes
1answer
33 views
How to handle returned value if an exception happens in a library code
There is a lib code, trying to parse an Element Tree object. If exception happens, it either returns an empty dict of dict or a partially constructed object of such type. In this case, caller needs to ...
2
votes
2answers
101 views
Raising an assertation error if string is not an email
I created a class EmailParser and check if a supplied string is an email or not with
the help of the standard librarie's email module. If the supplied string is not an
email I raise an exception.
...