summaryrefslogtreecommitdiffstats
path: root/Demo/pdist/server.py
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2007-08-06 21:07:53 (GMT)
committerSkip Montanaro <skip@pobox.com>2007-08-06 21:07:53 (GMT)
commit1e8ce58f5d0db22714d65ff440045a7526ed394d (patch)
treef705fb923334cffa32492a5bddfcca46ecc27f0a /Demo/pdist/server.py
parent28a181cbe82bc79df3b881b79b19e12b2e39911b (diff)
downloadcpython-1e8ce58f5d0db22714d65ff440045a7526ed394d.zip
cpython-1e8ce58f5d0db22714d65ff440045a7526ed394d.tar.gz
cpython-1e8ce58f5d0db22714d65ff440045a7526ed394d.tar.bz2
remove most uses of list(somedict.keys()) in Demo scripts
Diffstat (limited to 'Demo/pdist/server.py')
-rwxr-xr-xDemo/pdist/server.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Demo/pdist/server.py b/Demo/pdist/server.py
index 98a4741..7e77971 100755
--- a/Demo/pdist/server.py
+++ b/Demo/pdist/server.py
@@ -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))