Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dabeaz-course/practical-python
/ __iter__
Method
__iter__
Solutions/6_12/portfolio.py:7–8 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
5
self._holdings = holdings
6
7
def
__iter__(self):
8
return
self._holdings.__iter__()
9
10
def
__len__(self):
11
return
len(self._holdings)
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected