This raises an error:
ValueError: List parameter 'Test.gen' must be a list, not an object of <class 'generator'>.
import param
class Test(param.Parameterized):
gen = param.List()
Test(gen=(i for i in range(0, 10)))
This raises an error:
ValueError: List parameter 'Test.gen' must be a list, not an object of <class 'generator'>.
import param
class Test(param.Parameterized):
gen = param.List()
Test(gen=(i for i in range(0, 10)))
You could do:
class Test(param.Parameterized):
gen = param.ClassSelector(class_=types.GeneratorType)
But generators are somewhat finicky so be careful using them.