QUERY · ISSUE
AttributeError: 'defaultdict' object has no attribute 'items'
>>> 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.
CANDIDATE · ISSUE
type object has no attribute __doc__
In Python 3.4, the following script works
from collections import namedtuple
T = namedtuple('T', 'a b')
T.__doc__ = 'Test'
When running with MicroPython I am getting the error
Traceback (most recent call last):
File "t-doc.py", line 4, in <module>
AttributeError: 'type' object has no attribute '__doc__'
Funny enough, we probably expect all documentation to be removed by MicroPython, so T.__doc__ = 'Test' should probably do nothing?
Can I work on this issue? @xrmx
This seems to still be the case - no "items()" function in the defaultdict module.
Anyone is welcomed to open merge requests in the MicroPython project :)