Use built-in map function to simplify some list comprehensions

svn: r16636
This commit is contained in:
Gerald Britton
2011-02-16 20:06:40 +00:00
parent 66d5991362
commit a19e65073c
11 changed files with 79 additions and 39 deletions

View File

@@ -270,7 +270,9 @@ class PSDrawDoc(BaseDoc, DrawDoc):
self.file.write('[] 0 setdash\n')
else:
dash_style = stype.get_dash_style(stype.get_line_style())
self.file.write('[%s] 0 setdash\n' % (" ".join([str(d) for d in dash_style])))
self.file.write('[%s] 0 setdash\n' % (
" ".join(map(str, dash_style)))
)
point = path[0]
x1 = point[0] + self.paper.get_left_margin()
@@ -311,7 +313,9 @@ class PSDrawDoc(BaseDoc, DrawDoc):
self.file.write('[] 0 setdash\n')
else:
dash_style = stype.get_dash_style(stype.get_line_style())
self.file.write('[%s] 0 setdash\n' % (" ".join([str(d) for d in dash_style])))
self.file.write('[%s] 0 setdash\n' % (
" ".join(map(str, dash_style)))
)
self.file.write(
'2 setlinecap\n' +