From 0eaef4f2b8064882e7497695ba352c719b543dc8 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Thu, 6 Jul 2017 11:54:40 -0400 Subject: python micro optimization in faster than find --- src/engine/SCons/PathList.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/SCons/PathList.py b/src/engine/SCons/PathList.py index 77e30c4..76cbeab 100644 --- a/src/engine/SCons/PathList.py +++ b/src/engine/SCons/PathList.py @@ -104,11 +104,11 @@ class _PathList(object): pl = [] for p in pathlist: try: - index = p.find('$') + found = '$' in p except (AttributeError, TypeError): type = TYPE_OBJECT else: - if index == -1: + if not found: type = TYPE_STRING_NO_SUBST else: type = TYPE_STRING_SUBST -- cgit v0.12