Skip to content

Commit

Permalink
Rewrite init/for/append loop as comprehension and if/else as tertiary…
Browse files Browse the repository at this point in the history
… statement.
  • Loading branch information
jaraco committed Nov 3, 2022
1 parent 85df0b2 commit f95d384
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions distutils/sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,13 +537,7 @@ def get_config_vars(*args):
_config_vars = sysconfig.get_config_vars().copy()
py39compat.add_ext_suffix(_config_vars)

if args:
vals = []
for name in args:
vals.append(_config_vars.get(name))
return vals
else:
return _config_vars
return [_config_vars.get(name) for name in args] if args else _config_vars


def get_config_var(name):
Expand Down

0 comments on commit f95d384

Please sign in to comment.