aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/Converter/Combine.py
blob: 35f4d0ef0f485ea37d2374c69c5c9ac991389d09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from Converter import Converter
from Components.Element import cached

class Combine(Converter, object):
	SINGLE_SOURCE = False

	def __init__(self, arg = None, func = None):
		Converter.__init__(self, arg)
		assert func is not None
		self.func = func

	@cached
	def getValue(self):
		return self.func(self.sources)

	value = property(getValue)