mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Revert unneccessary changes made in bpo-30296 and apply other improvements. (GH-2624)
This commit is contained in:
parent
6f600ff173
commit
3f2e6f15d6
4 changed files with 6 additions and 5 deletions
|
@ -460,7 +460,7 @@ class BaseConfigurator(object):
|
|||
c = self.resolve(c)
|
||||
props = config.pop('.', None)
|
||||
# Check for valid identifiers
|
||||
kwargs = dict((k, config[k]) for k in config if valid_ident(k))
|
||||
kwargs = {k: config[k] for k in config if valid_ident(k)}
|
||||
result = c(**kwargs)
|
||||
if props:
|
||||
for name, value in props.items():
|
||||
|
@ -723,7 +723,7 @@ class DictConfigurator(BaseConfigurator):
|
|||
config['address'] = self.as_tuple(config['address'])
|
||||
factory = klass
|
||||
props = config.pop('.', None)
|
||||
kwargs = dict((k, config[k]) for k in config if valid_ident(k))
|
||||
kwargs = {k: config[k] for k in config if valid_ident(k)}
|
||||
try:
|
||||
result = factory(**kwargs)
|
||||
except TypeError as te:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue