Skip to content

Commit

Permalink
ensure correct type coercion
Browse files Browse the repository at this point in the history
  • Loading branch information
Mego committed Jan 7, 2016
1 parent 2a1b2c2 commit 460d62c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions seriously.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ def __init__(self, init_stack=[], debug_mode=False, repl_mode=False, hex_mode=Fa
self.preserve = False
self.pop_counter = 0
def push(self,val):
if type(val) is TupleType:
val = list(val)
if type(val) is BooleanType:
val = int(val)
self.stack=[val]+self.stack
def pop(self):
return self.stack.pop(0) if not self.preserve else self.preserve_pop()
Expand Down

0 comments on commit 460d62c

Please sign in to comment.