[New-bugs-announce] [issue13088] Add Py_hexdigits constant: use one unique constant to format a digit to hexadecimal

STINNER Victor report at bugs.python.org
Sun Oct 2 01:32:57 CEST 2011


New submission from STINNER Victor <victor.stinner at haypocalc.com>:

CPython source code contains a lot of duplicate "0123456789abcdef" constants, declared as static variables. Attached patch uses one unique variable. Use also Py_hexdigit instead of ((c>9) ? c+'a'-10 : c + '0') in binascii, _hashopenssl, md5, sha1, sha256 and sha512 modules.

----------
files: hexdigits.patch
keywords: patch
messages: 144754
nosy: haypo
priority: normal
severity: normal
status: open
title: Add Py_hexdigits constant: use one unique constant to format a digit to hexadecimal
versions: Python 3.3
Added file: http://bugs.python.org/file23288/hexdigits.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13088>
_______________________________________


More information about the New-bugs-announce mailing list