Message333508
| Author | terry.reedy |
|---|---|
| Recipients | gvanrossum, josh.r, serhiy.storchaka, steven.daprano, terry.reedy, xtreak |
| Date | 2019-01-11.21:49:58 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1547243399.0.0.0024617686523.issue35712@roundup.psfhosted.org> |
| In-reply-to |
| Content | |
|---|---|
I consider it a nice feature of Python that all builtin objects, and, AFAIK (and Josh, apparently), all stdlib class instances, have a boolean value. (I am aware of numpy's element-wise behavior.) I hate to give this up. This is part of Python's general avoidance of singular exceptions and exceptions to exceptions. This proposal would be the latter: "An object is truthy, unless its class makes it false, unless it is NotImplemented and a TypeError." If this exception is made, I expect that there will be proposals to extend the exception to other objects, such as Ellipsis. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2019-01-11 21:50:00 | terry.reedy | set | recipients: + terry.reedy, gvanrossum, steven.daprano, serhiy.storchaka, josh.r, xtreak |
| 2019-01-11 21:49:58 | terry.reedy | set | messageid: <1547243399.0.0.0024617686523.issue35712@roundup.psfhosted.org> |
| 2019-01-11 21:49:58 | terry.reedy | link | issue35712 messages |
| 2019-01-11 21:49:58 | terry.reedy | create | |