On 01Sep2013 13:26, Chris “Kwpolska” Warrick wrote:
| On Sun, Sep 1, 2013 at 1:17 PM, Rui Maciel wrote:
| > Are there any guidelines on the use (and abuse) of Python's built-in
exceptions, telling where
| > it's ok to raise them and where it's preferable to define custom exceptions
instead?
|
Chris “Kwpolska” Warrick wrote:
> There are no rules. You should use common sense instead: if the
> exception fits your needs (eg. ValueError when incorrect output
> occurs) then use it.
Ok, thanks for the tip.
Rui Maciel
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, Sep 1, 2013 at 1:17 PM, Rui Maciel wrote:
> Are there any guidelines on the use (and abuse) of Python's built-in
> exceptions, telling where
> it's ok to raise them and where it's preferable to define custom exceptions
> instead?
There are no rules. You should use common sense instead:
Are there any guidelines on the use (and abuse) of Python's built-in
exceptions, telling where
it's ok to raise them and where it's preferable to define custom exceptions
instead?
Thanks in advance,
Rui Maciel
--
http://mail.python.org/mailman/listinfo/python-list