TypedListProperty

class ipkiss3.all.TypedListProperty

DefinitionProperty for storing a typed list.

In most cases you don’t want to use this property directly, but rather extend it to use more specific TypedLists.

Examples

from ipkiss3 import all as i3
class StrList(i3.TypedList):
    _item_type = str

class StrListProperty(i3.TypedListProperty):
    _list_type = StrList

class Example(i3.StrongPropertyInitializer):
    abc = StrListProperty(default=['a', 'b', 'c'])

example = Example()

print(example.abc)
=> ['a', 'b', 'c']

example.abc += ['d', 'e', f']
print(example.abc[-3:]) # We print the list three elements of the list
=> ['d', 'e', 'f']
allow_none
default
doc
preprocess
restriction
fdef_name