[issue12380] bytearray center, ljust, rjust don't accept a bytearray as the fill character

py.user report at bugs.python.org
Tue Jun 21 05:50:10 CEST 2011


New submission from py.user <port139 at yandex.ru>:

>>> bytearray(b'abc').rjust(10, b'*')
bytearray(b'*******abc')
>>> bytearray(b'abc').rjust(10, bytearray(b'*'))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: must be a byte string of length 1, not bytearray
>>>

----------
components: Interpreter Core
messages: 138769
nosy: py.user
priority: normal
severity: normal
status: open
title: bytearray center, ljust, rjust don't accept a bytearray as the fill character
type: behavior
versions: Python 2.7, Python 3.1

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


More information about the Python-bugs-list mailing list