[Tutor] Subclassing Exceptions

Lie Ryan lie.1296 at gmail.com
Sat Jan 7 21:25:57 CET 2012


On 01/07/2012 03:56 PM, Steven D'Aprano wrote:
> Chris Fuller wrote:
>
> You probably shouldn't inherit from SyntaxError, since it represents
> syntax errors in the Python code being interpreted or compiled. Any
> syntax error in your own data structures should be independent of
> SyntaxError.

I'd say a syntactical error in your own data structure is a kind of 
ValueError.



More information about the Tutor mailing list