[issue15034] Devguide should document best practices for stdlib exceptions
Ezio Melotti added the comment: I'm not sure this belongs to the devguide. Ideally the best way to do it should be documented in the docs. This doesn't necessary mean it should be in the tutorial, but if the way documented in the tutorial is wrong, I'd rather tell users this is the right way, do like this and don't worry about the details right now (but follow this link if you want to know more) than use this wrongish way that is simple but will break as soon as you start doing something more complex. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15034 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15034] Devguide should document best practices for stdlib exceptions
Terry J. Reedy added the comment: I think the Library Manual's chapter 5 on exceptions, currently called Built-in Exceptions, would be a good place for a section on subclassing exceptions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15034 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15034] Devguide should document best practices for stdlib exceptions
Changes by Chris Jerdonek chris.jerdo...@gmail.com: -- nosy: +cjerdonek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15034 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15034] Devguide should document best practices for stdlib exceptions
Terry J. Reedy tjre...@udel.edu added the comment: I agree with Raymond that this, especially super() is not tutorial material. I agree with David that we need something somewhere else. Just today a commit was pushed about IOException subclasses causing problems because they have an __init__ but don't call super(). (Something like that.) I had no idea about this issue. The stdlib has things like class ModException(Exception): pass. Is that okay because it does *not* have __init__ override? -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15034 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15034] Devguide should document best practices for stdlib exceptions
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15034 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15034] Devguide should document best practices for stdlib exceptions
R. David Murray rdmur...@bitdance.com added the comment: OK, let's move this, then. I asked the question because I'd like to know what the best practice is for exceptions in the stdlib. This is an area in which we have made quite a bit of progress recently (ie: the work done on exceptions for Python3, and PEP 3151), but I think there is still a lack of documentation (and possibly consensus?) on best practices for the stdlib. -- components: +Devguide -Documentation resolution: later - status: closed - open title: tutorial should use best practices in user defined exceptions section - Devguide should document best practices for stdlib exceptions ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15034 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com