From 068e59784fbbb28c819a279fa07c4e16a7954317 Mon Sep 17 00:00:00 2001 From: Nikhil Parasaram Date: Mon, 5 Nov 2018 19:29:22 +0530 Subject: [PATCH] Remove mutable args in the function name --- mythril/laser/ethereum/state.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mythril/laser/ethereum/state.py b/mythril/laser/ethereum/state.py index edc31194..bc9ec394 100644 --- a/mythril/laser/ethereum/state.py +++ b/mythril/laser/ethereum/state.py @@ -171,7 +171,7 @@ class MachineStack(list): """ STACK_LIMIT = 1024 - def __init__(self, default_list=[]): + def __init__(self, default_list=None): super(MachineStack, self).__init__(default_list) def append(self, element): @@ -219,11 +219,11 @@ class MachineState: """ MachineState represents current machine state also referenced to as \mu """ - def __init__(self, gas, pc=0, stack=[], memory=[], constraints=None, depth=0): + def __init__(self, gas, pc=0, stack=None, memory=None, constraints=None, depth=0): """ Constructor for machineState """ self.pc = pc self.stack = MachineStack(stack) - self.memory = memory + self.memory = memory or [] self.gas = gas self.constraints = constraints or Constraints() self.depth = depth