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

Empty list becomes a tuple in AttrDict #39

@deti

Description

@deti

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions