Skip to content

Q: given a node, a in this case, how to know if its type is a container or not (list or dict in Python)? #628

Open
@mw66

Description

@mw66

"dict_del": "a = {1: 1}; del a[1]; assert not a",

The last assert need to be translated into D as:

  assert(not(len(a) != 0))

In this case, given a node, a in this case, how to know if its type is a container or not (list or dict in Python)?

And also how to know its parent scope, i.e. not in this case, is a bool type?

Thanks.

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