Skip to content

get not defined to match getindex #50

@oxinabox

Description

@oxinabox

When something is dict-like, and defined getindex like Node does to access attributes,
I expect it to also provide get to do that with a default.


julia> n = XML.Element("Foo"; x="bar")
Node Element <Foo x="bar">

julia> n["x"]
"bar"

julia> get(n, "x", "default")
ERROR: MethodError: no method matching get(::Node, ::String, ::String)
The function `get` exists, but no method is defined for this combination of argument types.

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