This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients docs@python, kristjan.jonsson, martin.panter, yselivanov
Date 2015-11-18.00:00:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1447804832.03.0.781667481662.issue14911@psf.upfronthosting.co.za>
In-reply-to
Content
I can’t really comment on the 2.7 version, because I’m not too familiar with Python 2 exceptions.

For Python 3, is there any reason to bless the None, tuple or non-exception cases as the exception “value” argument? IMO these just make things too complicated without any benefit. Changes I would make to the patch:

* Only mention that “value” can be omitted, or it can be an instance of the class specified by “type”. Drop mentioning the None option, and the single or tuple constructor argument options. It looks like the tuple option actually gets expanded to multiple constructor arguments?!
* Mention that if “value” is passed, its traceback could be lost
* Drop the example, unless someone can come up with a concise and realistic example
* Unify with definition for coroutines <https://docs.python.org/dev/reference/datamodel.html#coroutine.throw>
* Change the doc string(s) to match the argument names, but don’t bother copying the full definition text
History
Date User Action Args
2015-11-18 00:00:32martin.pantersetrecipients: + martin.panter, kristjan.jonsson, docs@python, yselivanov
2015-11-18 00:00:32martin.pantersetmessageid: <1447804832.03.0.781667481662.issue14911@psf.upfronthosting.co.za>
2015-11-18 00:00:32martin.panterlinkissue14911 messages
2015-11-18 00:00:31martin.pantercreate