[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: RE: DOCBOOK: DocBook 4.0: ClassSynopsis
Peter Ring writes: > In Python, there are two exception styles in Python; old-style > string objects (match on object identity) and new-style class > instances (match on class or base class). You must be able to > describe exceptions that are not classes, as well as classes > that are used for exceptions. Peter, But you should never write code that creates new string exceptions. For Python 1.6, the -X option (standard exceptions as strings) will disappear, and the standard library will only use class exceptions. (String exceptions will still be supported due to legacy code.) Python 2.0 will not support string exceptions; expect a requirement to derive your exceptions from Exception. But this does indicate that there should be some way of flagging exceptions as either class-based or string-based for Python, but I think the role attribute should be sufficient. -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> Corporation for National Research Initiatives
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC