Commit 6090fd65 authored by Michal's avatar Michal Committed by Jehan

"Generator Expressions" improvements

https://www.python.org/dev/peps/pep-0289/
parent 82e59a95
......@@ -90,7 +90,7 @@ def colorxhtml(img, drawable, filename, raw_filename,
allchars = string.maketrans('', '')
goodchars = string.digits + string.ascii_letters + string.punctuation
badchars = ''.join([c for c in allchars if c not in goodchars])
badchars = ''.join(c for c in allchars if c not in goodchars)
chars = chars.translate(allchars, badchars)
......
......@@ -410,7 +410,7 @@ class _ReadLine(object):
self.__insert(iter, "\n")
width = max(self.__get_width(), 4)
max_width = max([len(s) for s in completions])
max_width = max(len(s) for s in completions)
n_columns = max(int(width / (max_width + 1)), 1)
col_width = int(width / n_columns)
total = len(completions)
......
......@@ -128,8 +128,8 @@ def do_console():
cmd = ''
if len(proc.return_vals) > 0:
cmd = ', '.join([x[1].replace('-', '_')
for x in proc.return_vals]) + ' = '
cmd = ', '.join(x[1].replace('-', '_')
for x in proc.return_vals) + ' = '
cmd = cmd + 'pdb.%s' % proc.proc_name.replace('-', '_')
......@@ -138,8 +138,8 @@ def do_console():
else:
params = proc.params
cmd = cmd + '(%s)' % ', '.join([x[1].replace('-', '_')
for x in params])
cmd = cmd + '(%s)' % ', '.join(x[1].replace('-', '_')
for x in params)
buffer = self.cons.buffer
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment