Skip to content

Commit 0fb46a6

Browse files
committed
Fixing item 32 example code
1 parent 176258d commit 0fb46a6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

example_code/item_32.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ def __getattr__(self, name):
107107
class SavingDB(object):
108108
def __setattr__(self, name, value):
109109
# Save some data to the DB log
110-
pass
111110
super().__setattr__(name, value)
112111

113112

@@ -128,7 +127,7 @@ def __setattr__(self, name, value):
128127
# Example 10
129128
class BrokenDictionaryDB(object):
130129
def __init__(self, data):
131-
self._data = {}
130+
self._data = data
132131

133132
def __getattribute__(self, name):
134133
print('Called __getattribute__(%s)' % name)

0 commit comments

Comments
 (0)