sgzwiz / brython

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

Regression: do not support passed parameter as call parameter in list comprehension at release 20130217-222712 #83

Closed GoogleCodeExporter closed 9 years ago

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

def cards(cardin):
    assert 'n' in [cardinal for index,cardinal in enumerate(cardin)]
    assert 'n' in [cardinal for cardinal in '%s'%cardin]
    assert (0,'n') in [(index,cardinal) for index,cardinal in enumerate('%sw'%cardin)]
cards('nes')

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

Instead raises Reference Errror:

ReferenceError: cardin is not defined @ 
file:///home/carlo/Dropbox/Android/work/brython/brython.js:1690

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

Please provide any additional information below.
works fine in Brython version 1.0.20130214-215612

Original issue reported on code.google.com by ca...@nce.ufrj.br on 18 Feb 2013 at 2:33

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Errata: missing print('OK')

...
cards('nes')
print('OK')

Original comment by ca...@nce.ufrj.br on 18 Feb 2013 at 2:38

GoogleCodeExporter commented 9 years ago

Original comment by pierre.q...@gmail.com on 18 Feb 2013 at 1:08

GoogleCodeExporter commented 9 years ago
Fixed in revision #515
Thanks very much for all these bug reports !

Original comment by pierre.q...@gmail.com on 18 Feb 2013 at 8:01