nickers / tinypy

Automatically exported from code.google.com/p/tinypy
Other
0 stars 0 forks source link

** operator priority problem #8

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
print(2*3**2)

What is the expected output? What do you see instead?
18 is expected, but the result produced by tp is 36. It means that tp
interprets 2*3**2 as (2*3)**2. But it's clear that ** has higher priority
than *, so 2*3**2 should be interpreted as 2*(3**2). I think any other
expression like this will come across the same problem.

What version of the product are you using? On what operating system?
tinypy svn revision 24 and 25.

Please provide any additional information below.
NA.

Original issue reported on code.google.com by ybc2084@gmail.com on 7 May 2008 at 1:21

GoogleCodeExporter commented 8 years ago
add a line in tests.py to reproduce this issue.

Original comment by ybc2084@gmail.com on 7 May 2008 at 2:16

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by philhas...@gmail.com on 10 May 2008 at 6:34