Skip to content

Commit

Permalink
micro optimization on python startup ("x in set" instead of "x in list")
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Dec 15, 2023
1 parent 4407540 commit 7c10295
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions psutil/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1302,9 +1302,9 @@ def wait(self, timeout=None):
# The valid attr names which can be processed by Process.as_dict().
_as_dict_attrnames = set(
[x for x in dir(Process) if not x.startswith('_') and x not in
['send_signal', 'suspend', 'resume', 'terminate', 'kill', 'wait',
{'send_signal', 'suspend', 'resume', 'terminate', 'kill', 'wait',
'is_running', 'as_dict', 'parent', 'parents', 'children', 'rlimit',
'memory_info_ex', 'oneshot']])
'memory_info_ex', 'oneshot'}])


# =====================================================================
Expand Down

0 comments on commit 7c10295

Please sign in to comment.