[Tutor] int uncallable
cgw501@york.ac.uk
cgw501 at york.ac.uk
Mon Jul 18 22:00:25 CEST 2005
Hi,
This code:
for line in satFile:
lineListed = line.split()
start = int(lineListed[5])-1
end = int(lineListed[6])
hitLength = end - start
extra = len(lineListed[9])
total = hitLength + 2(extra)
gives an error:
Traceback (most recent call last):
File "test2.py", line 29, in ?
total = hitLength+ 2(extra)
TypeError: 'int' object is not callable
which confuses me. Why can't I call extra? Have I not called int objects
when I define hitLength, and that works fine.
Thanks,
Chris
More information about the Tutor
mailing list