Skip to content

doctify mystery - it's adding keys to a dict #9

@patrickwolf

Description

@patrickwolf

The code mystifies me @rsgalloway

def _set_data(self, data: dict):
"""Sets data.
:param data: data dictionary
"""
self.data = dotdictify(data)

self.data == None
True
data
{'type': 'PublishedFile', 'code': 'DEV_1000_comp_PIPE_v001.mov'}
data2 = dotdictify(data)
data2
{'type': 'PublishedFile', 'code': 'DEV_1000_comp_PIPE_v001.mov'}
self.data = data
self.data
{'type': 'PublishedFile', 'code': 'DEV_1000_comp_PIPE_v001.mov'}
self.data = data2
self.data
{'type': 'PublishedFile', 'code': 'DEV_1000_comp_PIPE_v001.mov', 'id': {}, 'name': {}, 'content': {}}

do you have any idea of what is happening there?

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