mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
Issue #22824: Simplify reprlib output format for empty arrays
This commit is contained in:
parent
5d43833982
commit
a34cd0c781
3 changed files with 6 additions and 1 deletions
|
@ -83,6 +83,8 @@ class Repr:
|
|||
return self._repr_iterable(x, level, '[', ']', self.maxlist)
|
||||
|
||||
def repr_array(self, x, level):
|
||||
if not x:
|
||||
return "array('%s')" % x.typecode
|
||||
header = "array('%s', [" % x.typecode
|
||||
return self._repr_iterable(x, level, header, '])', self.maxarray)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue