summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2016-04-07 22:24:53 +0100
committerJason R. Coombs <jaraco@jaraco.com>2016-04-07 22:24:53 +0100
commit8ce73d4450eb646b80c004e57b82ed9eabe24f35 (patch)
tree1cc6a57c5e9f5c87cbccf6deeb7fda00bd73d571
parentf664385be2051cd135ad52e1563993945e0abe10 (diff)
downloadpython-setuptools-git-8ce73d4450eb646b80c004e57b82ed9eabe24f35.tar.gz
Rely on short-circuit in 'or' rather than building a separate iterable.
-rw-r--r--pkg_resources/__init__.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
index 04064d5a..ab48cf7a 100644
--- a/pkg_resources/__init__.py
+++ b/pkg_resources/__init__.py
@@ -35,7 +35,6 @@ import plistlib
import email.parser
import tempfile
import textwrap
-import itertools
from pkgutil import get_importer
try:
@@ -991,13 +990,7 @@ class _ReqExtras(dict):
req.marker.evaluate({'extra': extra})
for extra in self.get(req, ())
)
- # set up a late-evaluated simple marker evaluation.
- simple_eval = (
- req.marker.evaluate()
- for _ in (None,)
- )
- evals = itertools.chain(extra_evals, simple_eval)
- return not req.marker or any(evals)
+ return not req.marker or any(extra_evals) or req.marker.evaluate()
class Environment(object):