[New-bugs-announce] [issue27492] Enhance bytearray_repr with bytes_repr's logic

Xiang Zhang report at bugs.python.org
Tue Jul 12 03:09:41 EDT 2016


New submission from Xiang Zhang:

Right now bytearray_repr's implementation mimics old string_repr, but it has a drawback: It arbitrarily checks overflow using four times the bytearray object's length, but the representation length of the value can range from 1 to 4. I think we can use bytes_repr's logic which calculates the actual output length.

----------
components: Interpreter Core
files: bytearray_repr.patch
keywords: patch
messages: 270231
nosy: serhiy.storchaka, xiang.zhang
priority: normal
severity: normal
status: open
title: Enhance bytearray_repr with bytes_repr's logic
type: enhancement
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file43697/bytearray_repr.patch

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


More information about the New-bugs-announce mailing list