Skip to content

null as default value for env interpolation #230

@apsdehal

Description

@apsdehal

If I pass null as default value to env interpolation, as with yaml, I expect to get the value as None, but I get the string 'null'.

from omegaconf import OmegaConf
a = OmegaConf.create({"a": "${env:a, null}"})
print(a.a) # prints "null"

If this is a not a bug, how can I specify None as the default value?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions