homepage

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 ncoghlan
Recipients doerwalter, ezio.melotti, lemburg, ncoghlan, python-dev, serhiy.storchaka, vstinner
Date 2013年11月23日.02:20:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1385173214.47.0.135960158308.issue19619@psf.upfronthosting.co.za>
In-reply-to
Content
The examples from the 3.4 What's New may make it clearer why the exception wrapping in the codec machinery is much broader in scope that just detecting output type errors (even though handling that case was the original motivation for the idea):
 >>> import codecs
 >>> codecs.decode(b"abcdefgh", "hex")
 binascii.Error: Non-hexadecimal digit found
 The above exception was the direct cause of the following exception:
 Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 binascii.Error: decoding with 'hex' codec failed (Error: Non-hexadecimal digit found)
 >>> codecs.encode("hello", "bz2")
 TypeError: 'str' does not support the buffer interface
 The above exception was the direct cause of the following exception:
 Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 TypeError: encoding with 'bz2' codec failed (TypeError: 'str' does not support the buffer interface)
History
Date User Action Args
2013年11月23日 02:20:14ncoghlansetrecipients: + ncoghlan, lemburg, doerwalter, vstinner, ezio.melotti, python-dev, serhiy.storchaka
2013年11月23日 02:20:14ncoghlansetmessageid: <1385173214.47.0.135960158308.issue19619@psf.upfronthosting.co.za>
2013年11月23日 02:20:14ncoghlanlinkissue19619 messages
2013年11月23日 02:20:14ncoghlancreate

AltStyle によって変換されたページ (->オリジナル) /