Skip to content

List props returns invalid empty list #169

@rowanc1

Description

@rowanc1

When not initialized the list properties return an empty list rather than None. This is confusing as in the case below, that is not even a valid thing:

import properties
class Array(properties.HasProperties):
    shape = properties.List(
        'shape of the 2d array',
        prop=properties.Integer('', min=1),
        min_length=2,
        max_length=2,
    )
a = Array()
print(a.shape)
#> []

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions