param icon indicating copy to clipboard operation
param copied to clipboard

Do Lists support `allow_None`?

Open maximlt opened this issue 3 years ago • 0 comments

The docs on Lists say that:

Because List parameters already have an empty value ([]), they do not support allow_None.

However that appears to be not quite true? Is that a documentation issue?

import param

class P(param.Parameterized):
    l = param.List(allow_None=True)

p = P()

print(p.l, p.param.l.allow_None)
# [] True

p.l = None
assert p.l is None

maximlt avatar Mar 06 '23 18:03 maximlt