[issue25386] msvcrt_putch/msvcrt_putwch don't check the return value of _putch/_putwch
Josh Snider added the comment: Here's a patch that raises an exception when _put[w]ch and _get[w]ch[e] are run without a console. Like Eryk Sun says, the get's work fine if you do unget before hand. -- keywords: +patch nosy: +Josh Snider Added file: http://bugs.python.org/file42501/issue25386.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25386> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26554] PC\bdist_wininst\install.c: Missing call to fclose()
Josh Snider added the comment: I suggested some changes to your patch. Your patch should also add your name to the Misc/ACKS file as I don't currently see an Aatish listed there. -- nosy: +Josh Snider ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26554> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26574] replace_interleave can be optimized for single character byte strings
New submission from Josh Snider: replace_interleave in Objects/bytesobject.c and Objects/bytearrayobject.c can be optimized for the special case where the interleaving byte string is a single character. Here's some quick results from timeit showing that it's about three times faster for the special case. * Before (cold start): >>> timeit.timeit('(b"x" * 200).replace(b"", b".")', number=1000) 7.619218342995737 * After (cold start): >>> timeit.timeit('(b"x" * 200).replace(b"", b".")', number=1000) 2.7605581780080684 For the non-special case, running timeit.timeit('(b"x" * 200).replace(b"", b".0")', number=1) takes ~173 seconds on both versions. -- components: Library (Lib) files: bytes.patch keywords: patch messages: 261870 nosy: Josh Snider priority: normal severity: normal status: open title: replace_interleave can be optimized for single character byte strings type: performance versions: Python 3.6 Added file: http://bugs.python.org/file42179/bytes.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26574> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26574] replace_interleave can be optimized for single character byte strings
Josh Snider added the comment: Addresses review comments. -- Added file: http://bugs.python.org/file42180/bytes-2.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26574> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com