Added some changes in parser and string variable to allow strings as variables.
| | |
| | | "unit": None, |
| | | } |
| | | for r in s.split("\n"): |
| | | sp = r.split(":") |
| | | sp = r.split(":", 1) |
| | | if sp[0].strip("\n\t'") == "formula": |
| | | retval["correct"].append(sp[1].strip("\n\t")) |
| | | elif sp[0].strip() == "napacna": |
| | |
| | | "generator": None, |
| | | } |
| | | for r in v.split("\n"): |
| | | sp = r.split(":") |
| | | sp = r.split(":", 1) |
| | | if sp[0].strip("\n\t'") == "ime": |
| | | name = sp[1].strip("\n\t'") |
| | | retval["name"] = name |
| | |
| | | ) |
| | | |
| | | try: |
| | | self.pool = [float(i) for i in arglist] |
| | | self.pool = [i for i in arglist] |
| | | except (ValueError, TypeError): |
| | | raise ValueError |
| | | |
| | |
| | | pass |
| | | |
| | | def toFormat(self, string): |
| | | return string |
| | | return string.replace("\"", "") |
| | | |
| | | def getValue(self, string): |
| | | return string |
| | | return "\"{}\"".format(str(string.replace("\"", ""))) |
| | | |
| | | class DecFloatFormatter(FormatterFactory): |
| | | def __init__(self, formatparameters): |