Re: Newbie: use of built-in exceptions

2013-09-02 Thread Cameron Simpson
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? |

Re: Newbie: use of built-in exceptions

2013-09-02 Thread Rui Maciel
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

Re: Newbie: use of built-in exceptions

2013-09-01 Thread Chris “Kwpolska” Warrick
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:

Newbie: use of built-in exceptions

2013-09-01 Thread Rui Maciel
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