MCPcopy Index your code
hub / github.com/python/cpython / _subst_vars

Function _subst_vars

Lib/sysconfig/__init__.py:243–250  ·  view source on GitHub ↗
(s, local_vars)

Source from the content-addressed store, hash-verified

241
242
243def _subst_vars(s, local_vars):
244 try:
245 return s.format(**local_vars)
246 except KeyError as var:
247 try:
248 return s.format(**os.environ)
249 except KeyError:
250 raise AttributeError(f'{var}') from None
251
252def _extend_dict(target_dict, other_dict):
253 target_keys = target_dict.keys()

Callers 1

_expand_varsFunction · 0.85

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…