[issue21864] Error in documentation of point 9.8 'Exceptions are classes too'

2016-11-06 Thread Berker Peksag
Berker Peksag added the comment: Thank you for the review, Andrew! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 ___ Python tracker __

[issue21864] Error in documentation of point 9.8 'Exceptions are classes too'

2016-11-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset db6d556365d7 by Berker Peksag in branch '3.5': Issue #21864: Remove outdated section about exceptions from the tutorial https://hg.python.org/cpython/rev/db6d556365d7 New changeset f82e348946e3 by Berker Peksag in branch '3.6': Issue #21864: Merge f

[issue21864] Error in documentation of point 9.8 'Exceptions are classes too'

2016-11-06 Thread A.M. Kuchling
A.M. Kuchling added the comment: The patch looks good to me; I think it should just be applied. -- nosy: +akuchling ___ Python tracker ___ ___

[issue21864] Error in documentation of point 9.8 'Exceptions are classes too'

2016-06-02 Thread Berker Peksag
Berker Peksag added the comment: I think the "Exceptions Are Classes Too" section can be removed now. Users already learned that exceptions are classes in the previous chapter: https://docs.python.org/3/tutorial/errors.html I'm attaching a patch that removes the "Exceptions Are Classes Too" se

[issue21864] Error in documentation of point 9.8 'Exceptions are classes too'

2014-06-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: The preceding sentence "There are two new valid (semantic) forms for the raise statement" is obsolete also as there is no other form (other than 'raise', which should not be in the tutorial previously). To rewrite this section for 3.x would require looking at

[issue21864] Error in documentation of point 9.8 'Exceptions are classes too'

2014-06-26 Thread Berker Peksag
Changes by Berker Peksag : -- stage: -> needs patch type: -> enhancement versions: +Python 3.5 ___ Python tracker ___ ___ Python-bug

[issue21864] Error in documentation of point 9.8 'Exceptions are classes too'

2014-06-24 Thread Josh Rosenberg
Josh Rosenberg added the comment: I think the section could use some additional rewording actually. The wording about deriving from type dates back to the Python 2 days; nowadays, all exceptions are actually required to derive from BaseException. The section definitely needs rewording. --

[issue21864] Error in documentation of point 9.8 'Exceptions are classes too'

2014-06-24 Thread Peibolvig
Peibolvig added the comment: Oh, I see. Thanks for the clarification. May I suggest to include that clarification into the documentation somehow? I think it would be easier to understand the point of the raises doing that. Maybe this suggestion could fit: In the first form, Class must be an in

[issue21864] Error in documentation of point 9.8 'Exceptions are classes too'

2014-06-24 Thread Josh Rosenberg
Josh Rosenberg added the comment: No. The first form, raise Class, is in fact a shorthand for raise Class(). That's the point. You only actually raise instances, but if you pass it a class directly, it instantiates it by calling its constructor with no arguments. The second form is not describ

[issue21864] Error in documentation of point 9.8 'Exceptions are classes too'

2014-06-24 Thread Peibolvig
New submission from Peibolvig: At point 9.8 of the 3.4.1 version documentation, ( https://docs.python.org/3/tutorial/classes.html#exceptions-are-classes-too ), there is an example of two ways to use the 'raise' statement: raise Class raise Instance The next two lines, state: "In the first for