def __init__(self, samplespace, product=None):
super(SampleSpace, self).__init__(samplespace)
self._outcome_length = len(samplespace[0])
self._outcome_class = samplespace[0].__class__
self._outcome_ctor = get_outcome_ctor(self._outcome_class)
// Since we have access to an outcome, we determine a product from it.
After Change
def __init__(self, samplespace, product=None):
super(SampleSpace, self).__init__(samplespace)
outcome = next(iter(samplespace))
self._outcome_length = len(outcome)
self._outcome_class = outcome.__class__
self._outcome_ctor = get_outcome_ctor(self._outcome_class)
// Since we have access to an outcome, we determine a product from it.