[issue28504] Cleanup unicode_decode_call_errorhandler_wchar/writer

2016-10-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM. Thank you Xiang.

I have extended your approach to all sources and have written other two 
patches: issues28510 and issue28511.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28504] Cleanup unicode_decode_call_errorhandler_wchar/writer

2016-10-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 204a43c452cc by Serhiy Storchaka in branch 'default':
Issue #28504: Cleanup unicode_decode_call_errorhandler_wchar/writer.
https://hg.python.org/cpython/rev/204a43c452cc

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28504] Cleanup unicode_decode_call_errorhandler_wchar/writer

2016-10-22 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28504] Cleanup unicode_decode_call_errorhandler_wchar/writer

2016-10-22 Thread Xiang Zhang

New submission from Xiang Zhang:

The patch makes several cleanups to 
unicode_decode_call_errorhandler_wchar/writer:

1. Use U instead O! for argument parser, it ought to be more efficient and 
write less code.
2. In theory, if inputobj is not bytes, there needs to be a goto onError, or it 
could crash. But PyUnicodeDecodeError_GetObject is guaranteed to return bytes, 
so we can remove the incomplete branch.
3. On success, we don't need Xdecref.

--
components: Interpreter Core
files: unicode_decode_call_errorhandler_*.patch
keywords: patch
messages: 279198
nosy: haypo, serhiy.storchaka, xiang.zhang
priority: normal
severity: normal
stage: patch review
status: open
title: Cleanup unicode_decode_call_errorhandler_wchar/writer
type: enhancement
versions: Python 3.7
Added file: 
http://bugs.python.org/file45189/unicode_decode_call_errorhandler_*.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com