Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
dmt
Commits
2c0042cc
Commit
2c0042cc
authored
Jul 23, 2020
by
Maxime Perrotin
Browse files
Fix Python2/Python3 incompatibility
map() function is lazy in python3
parent
c635a156
Pipeline
#2052
failed with stage
in 31 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
dmt/A_mappers/python_A_mapper.py
View file @
2c0042cc
...
...
@@ -547,7 +547,7 @@ def DumpTypeDumper(
lines
.
append
(
codeIndent
+
"state = self.GetState()"
)
lines
.
append
(
codeIndent
+
"length = %s.GetLength()"
%
variableName
)
lines
.
append
(
codeIndent
+
"self.Reset(state)"
)
lines
.
append
(
codeIndent
+
"map(partial(emitElem, %s), range(length))"
%
variableName
)
lines
.
append
(
codeIndent
+
"
list(
map(partial(emitElem, %s), range(length))
)
"
%
variableName
)
lines
.
append
(
codeIndent
+
'self.Reset(state)'
)
lines
.
append
(
codeIndent
+
'lines.append("}")'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment