Skip to content

Less quacking in Dict constructor? #39848

@timholy

Description

@timholy

This may have been discussed previously (I searched but didn't find it), but there are circumstances where duck-typing the Dict constructor can lead to confusion.

https://discourse.julialang.org/t/does-anyone-else-find-the-behavior-of-dict-namedtuple-a-little-funky-juli/56050

It may be worth briefly considering a future requirement that it be an iterable of Pairs? Or less drastically, where each item in the iterable have exactly 2 elements?

Metadata

Metadata

Assignees

No one assigned

    Labels

    designDesign of APIs or of the language itself

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions