X-Git-Url: https://git.yukkurigames.com/?p=python-bulletml.git;a=blobdiff_plain;f=bulletml%2Fexpr.py;fp=bulletml%2Fexpr.py;h=a00c99eefa4c27f1b9f14d9751d5784f491e5135;hp=b72fa224f7ed49bb2f166582f0ee85176852e003;hb=70d25195d561d8b5d3126c6bbac0ecad2a502f06;hpb=29b24c8fc17a3bdcccd1ac853eee5b90c6fd0856 diff --git a/bulletml/expr.py b/bulletml/expr.py index b72fa22..a00c99e 100644 --- a/bulletml/expr.py +++ b/bulletml/expr.py @@ -37,7 +37,7 @@ class NumberDef(object): expr = expr.string except AttributeError: pass - self.string = str(expr) + self.string = expr = str(expr) repl = lambda match: "params[%d]" % (int(match.group()[1:]) - 1) expr = re.sub(r"\$\d+", repl, expr.lower()) self.__expr = expr.replace("$rand", "random()").replace("$rank", "rank")