Skip to content

Allow custom return type for tryparse #37162

@pdeffebach

Description

@pdeffebach

Being able to return something specific after tryparse might be useful. See this discource pose for motivation.

currently you can do

something(tryparse(Float64, "BBB"), missing)

Would be nice if you could do

tryparse(Float64, "BBB", missing)

However this would be a feature unique to Julia, I think. R, at least does not allow this for either as.numeric or readr::parse_number.

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