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 amaury.forgeotdarc
Recipients amaury.forgeotdarc, ezio.melotti
Date 2012年01月19日.19:56:36
SpamBayes Score 0.015515894
Marked as misclassified No
Message-id <1327002997.43.0.435824061039.issue13830@psf.upfronthosting.co.za>
In-reply-to
Content
The script below shows that the error handler is always called with the same error object. The 'start', 'end', and 'reason' properties are correctly updated, but the 'args' is always the same and holds the values used for the first call.
It's a bit weird that error.args[2] is not equal to error.start, for example. All versions are affected: 2.7, 3.2, 3.3.
And by the way, I could not find where these are attributes documented.
def custom_handler(error):
 print(error.args,
 (error.start, error.end, error.reason))
 return b'?'.decode(), error.end
import codecs
codecs.register_error('custom', custom_handler)
b'\x80\xd0'.decode('utf-8', 'custom')
History
Date User Action Args
2012年01月19日 19:56:37amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, ezio.melotti
2012年01月19日 19:56:37amaury.forgeotdarcsetmessageid: <1327002997.43.0.435824061039.issue13830@psf.upfronthosting.co.za>
2012年01月19日 19:56:36amaury.forgeotdarclinkissue13830 messages
2012年01月19日 19:56:36amaury.forgeotdarccreate

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