Message230955
| Author |
martin.panter |
| Recipients |
The Compiler, martin.panter |
| Date |
2014年11月10日.11:17:39 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1415618259.95.0.742861248514.issue22836@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
This is one that has often bugged me. When your repr() implementation is broken, it is quite confusing figuring out what is going wrong. Falling back to object.__repr__() is one option, however I would probably be happy with a simple "exception in repr()" message, and a proper newline.
Another way that I have come across this is:
$ python -c 'import sys; sys.stdout.detach()'
Exception ignored in: [no newline]
The workaround there is to set sys.stdout = None. In that case I think repr(sys.stdout) is trying to say "ValueError: underlying buffer has been detached". |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2014年11月10日 11:17:39 | martin.panter | set | recipients:
+ martin.panter, The Compiler |
| 2014年11月10日 11:17:39 | martin.panter | set | messageid: <1415618259.95.0.742861248514.issue22836@psf.upfronthosting.co.za> |
| 2014年11月10日 11:17:39 | martin.panter | link | issue22836 messages |
| 2014年11月10日 11:17:39 | martin.panter | create |
|