Esempio n. 1
0
 def __init__(self):
     super().__init__('[-1,2,a,3.4]')
     self.term = Term.from_list_terms([
         Term.from_integer(-1),
         Term.from_integer(2),
         Term.from_atom_name('a'),
         Term.from_float(3.4)])
Esempio n. 2
0
 def __init__(self, value, prolog_string=None, **kwargs):
     super().__init__(type_='float', value=value,
                      prolog_string=(str(value) if prolog_string is None
                                     else prolog_string),
                      **kwargs)
     self.term = Term.from_float(value)