summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbladictionary.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bladictionary.py b/bladictionary.py
index a7ca8ce..9fe1827 100755
--- a/bladictionary.py
+++ b/bladictionary.py
@@ -218,7 +218,7 @@ def parse_oed(word):
#If we've reached a word type, add the current data to the list
if part in types.keys():
#Don't add empty definitions
- if id > 0 and definition is not " " and definition:
+ if id > 0 and definition != " " and definition:
item = Definition(word, id, "oed", word_type, definition, [], [], [])
items.append(item)
definition = ""
@@ -228,7 +228,7 @@ def parse_oed(word):
elif part.isdigit() and prev_part is not None:
#Ignore anything before the first definition
- if part is not "1":
+ if part != "1":
item = Definition(word, id, "oed", word_type, definition, [], [], [])
items.append(item)
definition = ""
@@ -392,7 +392,7 @@ def main():
types = ["n", "v", "adj", "adv", "tech", "urban"]
type_id = 0
- all_types = word_type is ""
+ all_types = word_type == ""
#Normally we try and display 1 of each type if no type is specified
#But if the word only has one type of definition, display all of them
@@ -411,7 +411,7 @@ def main():
found_type = False
cur_id = type_id
if item.id < page_num:
- if item.id is not 0:
+ if item.id != 0:
continue
elif item.id == 0 and page_num > 1:
continue