sgzwiz / brython

Automatically exported from code.google.com/p/brython
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Error in list, tuple statements with * and + operator oveload #65

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

print ((2,)*2)
print ((2,2)+(2,))
print ([2]*2)

What is the expected output? What do you see instead?
expected:
(2,2)
(2,2,2)
[2,2]
instead got wrong result and syntax error:
4
[2,2,2] # a modifiable list instead of a read only tuple
ExecutionError: (intermediate value).__mul__ is not a function
module '__main__' line 3
print ([2]*2)

What version of the product are you using? On what operating system?
Brython version 1.0.20130202-121412
Ubuntu 11.10

Please provide any additional information below.
works fine with string
print('2'*2)
22

Original issue reported on code.google.com by cet...@gmail.com on 2 Feb 2013 at 2:14

GoogleCodeExporter commented 9 years ago
Thanks, fixed in revision 611

Original comment by pierre.q...@gmail.com on 4 Mar 2013 at 3:06