remove most uses of list(somedict.keys()) in Demo scripts

This commit is contained in:
Skip Montanaro 2007-08-06 21:07:53 +00:00
parent 28a181cbe8
commit 1e8ce58f5d
17 changed files with 31 additions and 46 deletions

View file

@ -101,9 +101,7 @@ class Server:
def _listmethods(self, cl=None):
if not cl: cl = self.__class__
names = list(cl.__dict__.keys())
names = [x for x in names if x[0] != '_']
names.sort()
names = sorted([x for x in cl.__dict__.keys() if x[0] != '_'])
for base in cl.__bases__:
basenames = self._listmethods(base)
basenames = list(filter(lambda x, names=names: x not in names, basenames))