X Tutup
Skip to content

Commit 1da7794

Browse files
committed
Some Python 3 compatibility
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
1 parent 1ef719c commit 1da7794

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bpython/curtsiesfrontend/replpainter.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# -*- coding: utf-8 -*-
22

33
import logging
4+
import itertools
45

56
from curtsies import fsarray, fmtstr
67
from curtsies.formatstring import linesplit
@@ -169,7 +170,8 @@ def add_border(line):
169170
config.bottom_border * (width + 2) +
170171
config.right_bottom_corner)
171172

172-
output_lines = [top_line] + map(add_border, lines) + [bottom_line]
173+
output_lines = list(itertools.chain((top_line, ), map(add_border, lines),
174+
(bottom_line, )))
173175
r = fsarray(output_lines[:min(rows-1, len(output_lines)-1)] + output_lines[-1:])
174176
return r
175177

0 commit comments

Comments
 (0)
X Tutup