This should be textfile, not textfile.name (a simple "print line" will show that nothing was read). Also, look at the indents. I am assuming that this was a cut and paste error as the interpreter should give an error for the code you posted. Also, textfile.close() doesn't do anything. It is not the file name that you close but the pointer, which in the case is done by Python's garbage collector.
def readComments (textfile): ## <-- textfile
comments = []
inComment = False
for i, line in enumerate(open(textfile.name)): # <-- textfile.name