Skip to content

Commit cd744da

Browse files
committed
test: make test syntactically compatible with Python3
Python3 does not like the use of the unpacked tuple in the argument list, change the function's arity and require the caller to expand the tuple. `map` now returns an iterator rather than a list, simplify the iteration to unpack the elements in the list and use that to invoke the map'ed method instead.
1 parent 0de3535 commit cd744da

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/DebugInfo/local-vars.swift.gyb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,11 @@ type_initializer_map = [
8282
]
8383

8484
import re
85-
def derive_name((type, val)):
85+
def derive_name(type, val):
8686
return (re.sub(r'[<> ,\.\?\(\)\[\]-]', '_', type), type, val)
8787

88-
for name, type, val in map(derive_name, type_initializer_map):
88+
for (type, val) in type_initializer_map:
89+
(name, type, val) = derive_name(type, val)
8990
generic = (type in ['T', 'U'])
9091
function = "->" in type
9192
}%

0 commit comments

Comments
 (0)