sh_cpl/src/cpl_query/extension/list.py

13 lines
256 B
Python
Raw Normal View History

2021-07-26 15:21:57 +02:00
from cpl_query.extension.iterable import Iterable
2021-07-25 19:15:02 +02:00
2021-07-26 15:21:57 +02:00
class List(Iterable):
2021-07-25 19:15:02 +02:00
2021-07-26 15:21:57 +02:00
def __init__(self, t: type = None, values: list = None):
Iterable.__init__(self)
2021-07-25 19:15:02 +02:00
2021-07-26 15:21:57 +02:00
self._type = t
2021-07-25 19:15:02 +02:00
2021-07-26 15:21:57 +02:00
if values is not None:
self.extend(values)