Skip to content

Commit fec974d

Browse files
committed
Update dict.items() for Python 3 compatibility
In Python 3 `items()` return iterators, and a list is never fully build. The `items()` method in Python 3 works like `viewitems()` in Python 2.7. For more information see: https://docs.python.org/3/whatsnew/3.0.html#views-and-iterators-instead-of-lists
1 parent e9334a8 commit fec974d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

messagebird/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
class Base(object):
44
def load(self, data):
5-
for name, value in data.items():
5+
for name, value in list(data.items()):
66
if hasattr(self, name):
77
setattr(self, name, value)
88

0 commit comments

Comments
 (0)