Skip to content

creating instance with Undefined is not meant to assign Undefined #33

Open
@minrk

Description

@minrk

In traitlets, the Undefined sentinel is meant to be a placeholder for no value having been specified. However, some traittypes tests explicitly pass Undefined as the default value, paradoxically explicitly stating that a value has not been specified.

In traitlets 4.3, this results (I think incorrectly) in the value Undefined being set as the actual value of the trait. In traitlets master, the result on accessing the trait with Undefined value as an error, saying the value is undefined.

I'm not sure what use case these tests are meant to represent. Is it important to be able to explicitly store Undefined in traits? If so, it should probably be a different sentinel than the one in traitlets intended to mean "this has no value yet, fail on attempts to access it".

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