You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>> from collections import defaultdict
>>> dd = defaultdict(list)
>>> dd
<defaultdict object at 2006e7d0>
>>> dd.items()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'defaultdict' object has no attribute 'items'
defaultdict doesn't have an items() method, so iterating over it is a bit of a pain in the neck. Also no __repr__(), but that's not totally necessary I guess.
The text was updated successfully, but these errors were encountered:
defaultdict
doesn't have anitems()
method, so iterating over it is a bit of a pain in the neck. Also no__repr__()
, but that's not totally necessary I guess.The text was updated successfully, but these errors were encountered: