On Wed, Mar 1, 2017 at 3:57 PM, Robert Bragg <rob...@sixbynine.org> wrote:
> On Mon, Feb 27, 2017 at 8:01 PM, Dylan Baker <dy...@pnwbakers.com> wrote:

>>> +def output_rpn_equation_code(set, counter, equation, counter_vars):
>>> +    c("/* RPN equation: " + equation + " */")
>>> +    tokens = equation.split()
>>> +    stack = []
>>> +    tmp_id = 0
>>> +    tmp = None
>>> +
>>> +    for token in tokens:
>>> +        stack.append(token)
>>> +        while stack and stack[-1] in ops:
>>> +            op = stack.pop()
>>> +            argc, callback = ops[op]
>>> +            args = []
>>> +            for i in range(0, argc):
>>
>> Use xrange instead of range
>
> okey, can do.

I just realised that the use of xrange() became the only thing
stopping the script from being python version agnostic (python 3
removes xrange and plain range() behaves like xrange()) so I went back
to using range() here.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to