From 99a653e9eec6bc4df810225b1e77b3595e1e7d22 Mon Sep 17 00:00:00 2001 From: "Sakthipriyan Vairamani (thefourtheye)" Date: Sat, 19 Jan 2019 15:25:08 +0530 Subject: [PATCH] build: make compress_json python3 compatible This patch replaces a usage of `map` with list comprehension, which makes the script Python 3 compatiable. PR-URL: https://github.com/nodejs/node/pull/25582 Reviewed-By: Refael Ackermann --- tools/compress_json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/compress_json.py b/tools/compress_json.py index b52c5d7a252cf6..e48a3f2c3cb7cc 100644 --- a/tools/compress_json.py +++ b/tools/compress_json.py @@ -24,7 +24,7 @@ step = 20 slices = (data[i:i+step] for i in xrange(0, len(data), step)) - slices = map(lambda s: ','.join(str(ord(c)) for c in s), slices) + slices = [','.join(str(ord(c)) for c in s) for s in slices] text = ',\n'.join(slices) fp = open(sys.argv[2], 'w')