Skip to content

chuck() and pluck() should check for named dots #788

@mgirlich

Description

@mgirlich

I accidentally used chuck() instead of pluck() and was quite confused by the error as I provided a default. It was something along the lines of

purrr::chuck(list(a = NULL), "a", .default = "a")
#> Error: Plucked object can't be NULL

Created on 2020-08-13 by the reprex package (v0.3.0)

Then I realised that I actually wanted to use pluck() and .default was actually used as an index.

I guess chuck() and pluck() should use ellipsis::check_dots_unnamed(). At least for chuck() and .default this would make sense.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions