MCPcopy Create free account
hub / github.com/dabeaz-course/practical-python / __len__

Method __len__

Solutions/6_7/portfolio.py:10–11  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

8 return self._holdings.__iter__()
9
10 def __len__(self):
11 return len(self._holdings)
12
13 def __getitem__(self, index):
14 return self._holdings[index]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected