A set with one value like {0.25} is transformed into a SingleValue instance.
The suggestion is be able to transform the SingleValue back into a set with one element:
>>> from rbool import *
>>> myset = {0.25}
>>> single = from_any(myset)
>>> single
SingleValue(0.25)
>>> otherset = set(single)
TypeError: 'SingleValue' object is not iterable
The solution is to make SingleValue iterable with only one value:
class SingleValue:
...
def __iter__(self) -> Real:
yield self.internal
A
setwith one value like{0.25}is transformed into aSingleValueinstance.The suggestion is be able to transform the
SingleValueback into asetwith one element:The solution is to make
SingleValueiterable with only one value: