Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

Commit

Permalink
bugfix: a ** b was accidentally throwing a divide by zero error
Browse files Browse the repository at this point in the history
  • Loading branch information
SK1Y101 committed Mar 26, 2021
1 parent 991e763 commit 87ee8e5
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions PySkiylia/Interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,6 @@ def BinaryExpr(self, expr):
return float(left) / float(right)
elif optype == "StarStar":
self.checkNumber(expr.operator, left, right)
#divide if given
if float(right) == 0:
raise RuntimeError([expr.operator,"division by zero"])
return float(left) ** float(right)
elif optype == "Star":
#check if one (and only one) is a number, so we can repeat substrings
Expand Down

0 comments on commit 87ee8e5

Please sign in to comment.