Why can't I find `len(list)` in Python?
- by FarmBoy
I'm new to Python. I have a method that begins:
def foo(self, list):
length = len(list)
I've called len() successfully in other cases, but here I get:
TypeError: object of type 'type' has no len()
How do I convince Python that this object passed in is a list? What am I missing?