Skip to content

Commit

Permalink
Prefer update and generator expression to for/if loop
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Dec 4, 2016
1 parent c4df6d7 commit 24e0c48
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg_resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3005,9 +3005,11 @@ def _initialize(g=globals()):
"Set up global resource manager (deliberately not state-saved)"
manager = ResourceManager()
g['_manager'] = manager
for name in dir(manager):
if not name.startswith('_'):
g[name] = getattr(manager, name)
g.update(
(name, getattr(manager, name))
for name in dir(manager)
if not name.startswith('_')
)


@_call_aside
Expand Down

0 comments on commit 24e0c48

Please sign in to comment.