Skip to content

Commit 848e150

Browse files
committed
Small improvement
1 parent 19817b5 commit 848e150

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

NumberScript/interpreter.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,11 @@ def __init__(self):
166166
"""Initialize the interpreter"""
167167
pass
168168

169-
def interpret(self, code: str, variables_dict: dict = {}, function_dict: dict = {}, debug_mode: bool = False,library: bool = False) -> str:
169+
def interpret(self, code: str, variables_dict: dict = None, function_dict: dict = None, debug_mode: bool = False,library: bool = False) -> str:
170170
"""Interprets the code"""
171171
code = code.split(" ")
172+
variables_dict = {} if variables_dict is None else variables_dict
173+
function_dict = {} if function_dict is None else function_dict
172174
variables = variables_dict
173175
functions = function_dict
174176
for j in range(0, len(code)):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="NumberScript",
8-
version="1.13.1",
8+
version="1.13.2",
99
description="possibly the world's most simplest and restricted language.",
1010
author="Sasen Perera",
1111
long_description=longest_description,

0 commit comments

Comments
 (0)