File tree 1 file changed +9
-3
lines changed 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -37,8 +37,10 @@ class RandomNumberGenerator:
37
37
def limits (self ):
38
38
return self .limits
39
39
40
- def get_number (self , min_max = [ 1 , 10 ] ):
40
+ def get_number (self , min_max = None ):
41
41
"""Get a random number between min and max."""
42
+ if min_max is None :
43
+ min_max = [1 , 10 ]
42
44
assert all ([isinstance (i , int ) for i in min_max ])
43
45
return random .randint (* min_max )
44
46
@@ -54,7 +56,9 @@ def __getattr__(self, key):
54
56
return key
55
57
56
58
57
- def main (options : dict = {}) -> str :
59
+ def main (options : dict = None ) -> str :
60
+ if options is None :
61
+ options = {}
58
62
pdb .set_trace ()
59
63
if "run" in options :
60
64
value = options ["run" ]
@@ -73,7 +77,9 @@ def main(options: dict = {}) -> str:
73
77
f .close ()
74
78
75
79
76
- def moon_chooser (moon , moons = ["europa" , "callisto" , "phobos" ]):
80
+ def moon_chooser (moon , moons = None ):
81
+ if moons is None :
82
+ moons = ["europa" , "callisto" , "phobos" ]
77
83
if moon is not None :
78
84
moons .append (moon )
79
85
You can’t perform that action at this time.
0 commit comments