From bac788a3cd348203a5fdabba52e5faf65bf35c5e Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Tue, 4 May 2004 09:21:43 +0000 Subject: Replace str.find()!=1 with the more readable "in" operator. --- Lib/robotparser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/robotparser.py') diff --git a/Lib/robotparser.py b/Lib/robotparser.py index 6b23188f19..13d8ac2528 100644 --- a/Lib/robotparser.py +++ b/Lib/robotparser.py @@ -214,7 +214,7 @@ class Entry: # we have the catch-all agent return True agent = agent.lower() - if useragent.find(agent) != -1: + if agent in useragent: return True return False -- cgit v1.2.1