Skip to content

_make is part of namedtuple's contract, not tuple #72

@marksteward

Description

@marksteward

I think these should read namedtuple:

https://github.com/Infinidat/munch/blob/d0aeb06/munch/__init__.py#L461
https://github.com/Infinidat/munch/blob/d0aeb06/munch/__init__.py#L523

Currently, if a custom class inherits from tuple and an instance ends up with a _make attribute, munch will call it when the __dict__ attribute is accessed. Unlikely to happen by chance, but munch also inserts itself into SafeLoader, so it should probably err on the defensive side.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions