Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bslatkin/effectivepython
/ to_dict
Method
to_dict
example_code/item_054.py:52–53 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
50
print(
"Example 1"
)
51
class
ToDictMixin:
52
def
to_dict(self):
53
return
self._traverse_dict(self.__dict__)
54
55
def
_traverse_dict(self, instance_dict):
56
output = {}
Callers
3
_traverse
Method · 0.80
item_054.py
File · 0.80
to_json
Method · 0.80
Calls
1
_traverse_dict
Method · 0.95
Tested by
no test coverage detected