News for hackers. Stuff that matters.
Re:Spaceship Generator by ecdavis on Saturday June 18, 2016 @06:54PM (#11931003)
'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.

There are no comments on this comment yet.