I've looked at this so long that I must be looking right past it. This
code:
class Page:
############### ############### ############### #############
def write(self, value, row=None, col=None, len=None):
print isinstance(valu e, str)
# error occurs on this line
print len(value)
############### ############### ############### ###########
if __name__ == "__main__":
p = Page()
p.write("banana ")
is throwing this error:
True
Traceback (most recent call last):
File "P2.py", line 13, in ?
p.write("banana ")
File "P2.py", line 7, in write
print len(value)
TypeError: 'NoneType' object is not callable
What am I missing?
code:
class Page:
############### ############### ############### #############
def write(self, value, row=None, col=None, len=None):
print isinstance(valu e, str)
# error occurs on this line
print len(value)
############### ############### ############### ###########
if __name__ == "__main__":
p = Page()
p.write("banana ")
is throwing this error:
True
Traceback (most recent call last):
File "P2.py", line 13, in ?
p.write("banana ")
File "P2.py", line 7, in write
print len(value)
TypeError: 'NoneType' object is not callable
What am I missing?
Comment