"Generator Expressions" improvements
https://www.python.org/dev/peps/pep-0289/
This commit is contained in:
parent
82e59a951d
commit
6090fd654f
3 changed files with 6 additions and 6 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue