You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2017-08-09.19:14:14.846>created_at=<Date2017-08-09.02:37:55.342>labels= ['type-feature', 'docs']
title='Tutorial wording implies an understanding of a concept prior to it being introduced'updated_at=<Date2017-08-09.19:14:14.845>user='https://bugs.python.org/LoremIpsum'
"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:"
It is okay for the tutorial to occasionally have forward references.
Python is a fully object oriented language so references to classes and instances will appear in many places. AFAICT, this particular passage has never caused any reported difficulty for any users. As it reads now, I find it to be clear and correct guidance.
I concur with Raymond, particularly because paragraph 1 of section 8.5 links to the Classes tutorial which covers inheritance. I think the documentation is sufficient as is.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: