Message299962
Python 3.5.4 Tutorial Section 8.5. User-defined Exceptions Paragraph 2 (https://docs.python.org/3.5/tutorial/errors.html#user-defined-exceptions) states [emphasis mine]:
"When creating a module that can raise several distinct errors, a common practice is to create a base class for exceptions defined by that module, and SUBCLASS THAT TO create specific exception classes for different error conditions:"
The use of 'subclass' as a verb when it has not been used so prior is confusing, especially to beginners. The concept of a class is not formally covered until Section 9 and up until this point in the tutorial, 'class' has been used as a noun. When read with 'subclass' as a noun, the sentence is nonsensical. It may also be that the comma which precedes 'and' is not proper usage.
Suggested improvement: change "subclass that to create specific classes for..." to "then create specific exception subclasses for..."
"When creating a module that can raise several distinct errors, a common practice is to create a base class for exceptions defined by that module, and then create specific exception subclasses for different error conditions:" |
|
Date |
User |
Action |
Args |
2017-08-09 02:37:55 | Lorem Ipsum | set | recipients:
+ Lorem Ipsum, docs@python |
2017-08-09 02:37:55 | Lorem Ipsum | set | messageid: <1502246275.38.0.890057309211.issue31152@psf.upfronthosting.co.za> |
2017-08-09 02:37:55 | Lorem Ipsum | link | issue31152 messages |
2017-08-09 02:37:54 | Lorem Ipsum | create | |
|