Skip to content

Commit

Permalink
remove main function as per python convention
Browse files Browse the repository at this point in the history
  • Loading branch information
Quint Guvernator committed Jun 2, 2014
1 parent 304d02b commit 5b734e5
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions rpcalc/rpn.py
Expand Up @@ -151,16 +151,11 @@ def workLoop(stack, buf, errors, printFlag): # fifth re-write!
buf += getch() # reads input from user without enter key
buf, errors, printFlag = keyHandler(stack, buf, errors)


# DO IT #
def main(limit=None, values=None):
if __name__ == "__main__":
stack = Stack([], 'stack view', limit=limit)
buf, errors, printFlag = '', '', False
if values:
for n in values:
stack.push(n)
workLoop(stack, buf, errors, printFlag)

if __name__ == "__main__":
main()

0 comments on commit 5b734e5

Please sign in to comment.