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 ethan.furman
Recipients aronacher, catalin.iacob, draghuram, eric.araujo, ethan.furman, ezio.melotti, mrabarnett, ncoghlan, pitrou, poke, rhettinger, steven.daprano
Date 2012-01-29.14:11:17
SpamBayes Score 0.000986516
Marked as misclassified No
Message-id <1327846278.71.0.104906899167.issue6210@psf.upfronthosting.co.za>
In-reply-to
Content
Current semantics (before patch):

cause is not None  --> cause is set, display it instead of context
cause is None  --> no cause, try to display context

context is not None  --> no context
context is None  --> context set, display it (unless cause already displayed)

---

Proposed semantics (after patch)

cause is True  --> context set, but no display
cause is not None  --> cause set, display it instead of context
cause is None  --> no cause, try to display context

context is None --> no context
context is not None --> context set, display it (unless cause already displayed)

---

I prefer to go with True for cause, instead of False, as a way of saying "Yes, there was an exception before this one, but I'm not going to display it" as opposed to None meaning "No there is no cause, and I'm not going to show you the context either".

Using True instead of False, and leaving the None's as they are now, preserves the behavior of None meaning none, as in "there isn't one".
History
Date User Action Args
2012-01-29 14:11:18ethan.furmansetrecipients: + ethan.furman, rhettinger, ncoghlan, pitrou, draghuram, aronacher, ezio.melotti, eric.araujo, mrabarnett, steven.daprano, poke, catalin.iacob
2012-01-29 14:11:18ethan.furmansetmessageid: <1327846278.71.0.104906899167.issue6210@psf.upfronthosting.co.za>
2012-01-29 14:11:18ethan.furmanlinkissue6210 messages
2012-01-29 14:11:17ethan.furmancreate