sgzwiz / brython

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

Function execution bug #89

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When a function is called, this function is executed more than once if it 
returns more than one parameter. 
It is executed 2 times if it returns 2 parameters, 3 times if it returns 3 
parameters and so on.
I have joined a sample case which reproduces the problem.

Original issue reported on code.google.com by d...@famillepinault.fr on 24 Feb 2013 at 9:49

Attachments:

GoogleCodeExporter commented 9 years ago
A much simpler test case is :
def test():
    print("function test() run")
    return 0, 1, 2, 3
var1, var2, var3, var4 = test()

The following does not reproduce the problem :
def test():
    print("function test() run")
    return 0, 1, 2, 3
vars = test()

Original comment by d...@famillepinault.fr on 25 Feb 2013 at 1:01

GoogleCodeExporter commented 9 years ago
Merci Nicolas, résolu dans la version 597
J'ai aussi corrigé un bug avec
(x,y),(a,b)=test1(),test2()

Original comment by pierre.q...@gmail.com on 27 Feb 2013 at 7:18

GoogleCodeExporter commented 9 years ago

Original comment by pierre.q...@gmail.com on 27 Feb 2013 at 7:18