sgzwiz / brython

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

Regression: unpack list and keyword parameters fails as syntax error #76

Closed GoogleCodeExporter closed 9 years ago

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

def unpack(x,y):
    return (x,y)
assert unpack(*(1,2))==(1,2)
assert unpack(**{'x':1, 'y':2})==(1,2)
class Un:
  def unpack(self, x, y):
    return (x,y)
assert Un().unpack(*(1,2))==(1,2)
assert Un().unpack(**{'x':1, 'y':2})==(1,2)
print('OK')

What is the expected output? What do you see instead?

OK

instead fails syntax check:

SyntaxError: token ( after *[]
module '__main__' line 3
assert unpack(*(1,2))==(1,2)
               ^ @ http://www.brython.info/py_utils.js:164

What version of the product are you using? On what operating system?
Brython version 1.1.20130217-084411
Linux Mint 14

Please provide any additional information below.
runs ok in:
Brython version 1.0.20130214-215612

Original issue reported on code.google.com by ca...@nce.ufrj.br on 17 Feb 2013 at 10:20

GoogleCodeExporter commented 9 years ago
Ok, fixed in revision 518

Original comment by pierre.q...@gmail.com on 17 Feb 2013 at 8:58