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