Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 66a5d93

Browse files
committed
Remove one instance of list() around map() which is then directly consumed by another map()
1 parent 4e0e1ce commit 66a5d93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/mlab.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2236,8 +2236,8 @@ def binary_repr(number, max_length=1025):
22362236
"""
22372237

22382238
# assert number < 2L << max_length
2239-
shifts = list(map(operator.rshift, max_length * [number],
2240-
range(max_length - 1, -1, -1)))
2239+
shifts = map(operator.rshift, max_length * [number],
2240+
range(max_length - 1, -1, -1))
22412241
digits = list(map(operator.mod, shifts, max_length * [2]))
22422242
if not digits.count(1):
22432243
return 0

0 commit comments

Comments
 (0)