Commit 8ce73d44 authored by Jason R. Coombs's avatar Jason R. Coombs

Rely on short-circuit in 'or' rather than building a separate iterable.

parent f664385b
...@@ -35,7 +35,6 @@ import plistlib ...@@ -35,7 +35,6 @@ import plistlib
import email.parser import email.parser
import tempfile import tempfile
import textwrap import textwrap
import itertools
from pkgutil import get_importer from pkgutil import get_importer
try: try:
...@@ -991,13 +990,7 @@ class _ReqExtras(dict): ...@@ -991,13 +990,7 @@ class _ReqExtras(dict):
req.marker.evaluate({'extra': extra}) req.marker.evaluate({'extra': extra})
for extra in self.get(req, ()) for extra in self.get(req, ())
) )
# set up a late-evaluated simple marker evaluation. return not req.marker or any(extra_evals) or req.marker.evaluate()
simple_eval = (
req.marker.evaluate()
for _ in (None,)
)
evals = itertools.chain(extra_evals, simple_eval)
return not req.marker or any(evals)
class Environment(object): class Environment(object):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment