Use built-in map function to simplify some list comprehensions
svn: r16636
This commit is contained in:
@@ -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' +
|
||||
|
||||
Reference in New Issue
Block a user