3 ms·
'seed' is explicitly imported on line 18, then overwritten on line 736, and yet it's used as a function on line 526. As far as I can tell, that is an error.
by ecdavis 10y ago
'seed' is explicitly imported on line 18, then overwritten on line 736, and yet it's used as a function on line 526. As far as I can tell, that is an error.
>>> from random import seed
>>> def f(): return seed(10)
>>> seed = 50
>>> f()
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
f()
File "<pyshell#2>", line 1, in f
def f(): return seed(10)
TypeError: 'int' object is not callable
>>>
I haven't run the script, so take this with a grain of salt.
EDIT: Since generate_spaceship is always called with an empty random_seed parameter, this error won't happen when the script is run.