Skip to content

Commit 3040e65

Browse files
committed
remove list(map(...))
1 parent 5b66460 commit 3040e65

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cypari2/convert.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -536,21 +536,21 @@ cpdef gen_to_python(Gen z):
536536
[1, 2, 3]
537537
>>> type(a1)
538538
<... 'list'>
539-
>>> list(map(type, a1))
539+
>>> [type(x) for x in a1]
540540
[<... 'int'>, <... 'int'>, <... 'int'>]
541541
542542
>>> a2 = gen_to_python(z2); a2
543543
[1, 3.4, [-5, 2], inf]
544544
>>> type(a2)
545545
<... 'list'>
546-
>>> list(map(type, a2))
546+
>>> [type(x) for x in a2]
547547
[<... 'int'>, <... 'float'>, <... 'list'>, <... 'float'>]
548548
549549
>>> a3 = gen_to_python(z3); a3
550550
[1, 5.2]
551551
>>> type(a3)
552552
<... 'list'>
553-
>>> list(map(type, a3))
553+
>>> [type(x) for x in a3]
554554
[<... 'int'>, <... 'float'>]
555555
556556
Converting matrices:

0 commit comments

Comments
 (0)