AttrDict icon indicating copy to clipboard operation
AttrDict copied to clipboard

Empty list becomes a tuple in AttrDict

Open deti opened this issue 8 years ago • 1 comments

In Python 3.5 with attrdict 2.0.0

first_dict = AttrDict()
first_dict.second_list = list()
for i in range(10):
    first_dict.second_list.append(i)
print("Debug dict. Attr dict01: '{}'".format(first_dict))

Gives

AttributeError: 'tuple' object has no attribute 'append'

It looks like AttrDict converts empty lists into tuples.

deti avatar Nov 06 '16 12:11 deti

Not just 3.5

https://github.com/bcj/AttrDict/issues/34

jonschull avatar Feb 14 '17 22:02 jonschull