Skip to content

Commit 5a3ad6f

Browse files
Update quackery_OOP.py
1 parent fdc3410 commit 5a3ad6f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

quackery_OOP.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ def sub_build():
209209
if nesting < 0:
210210
raise SyntaxError('Unexpected end of nest.')
211211
return the_nest
212-
elif word in self.builders.keys():
212+
elif word in self.builders:
213213
self.builders[word](self)
214-
elif word in self.operators.keys():
214+
elif word in self.operators:
215215
the_nest.append(self.operators[word])
216216
elif isinteger(word):
217217
the_nest.append(int(word, 10))
@@ -1646,7 +1646,7 @@ def quackery(source_string, ctx = None):
16461646
ctx = QuackeryContext()
16471647
else:
16481648
for required_word in ('stacksize', 'pack', 'decimal', 'unbuild', 'quackery'):
1649-
if required_word not in ctx.operators.keys():
1649+
if required_word not in ctx.operators:
16501650
raise NameError('QuackeryContext must have word %s defined.' % required_word)
16511651

16521652
while True:

0 commit comments

Comments
 (0)