Skip to content
This repository has been archived by the owner on Feb 2, 2019. It is now read-only.

Empty list becomes a tuple in AttrDict #39

Open
deti opened this issue Nov 6, 2016 · 1 comment
Open

Empty list becomes a tuple in AttrDict #39

deti opened this issue Nov 6, 2016 · 1 comment

Comments

@deti
Copy link

deti commented Nov 6, 2016

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.

@jonschull
Copy link

Not just 3.5

#34

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants