mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
remove most uses of list(somedict.keys()) in Demo scripts
This commit is contained in:
parent
28a181cbe8
commit
1e8ce58f5d
17 changed files with 31 additions and 46 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue