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

Method __len__

Solutions/7_11/portfolio.py:29–30  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

27 return self._holdings.__iter__()
28
29 def __len__(self):
30 return len(self._holdings)
31
32 def __getitem__(self, index):
33 return self._holdings[index]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected