sgzwiz / brython

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

Regression: weird beahaivior with default keyword parameters at release 20130217 #82

Closed GoogleCodeExporter closed 9 years ago

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

def noop():
    return False
def weird(a, b=None, c=None):
 return (a,b,c)
def weirdo(a, b=noop, c=None):
 return (a,b,c)
assert 1 in weird(1)
assert 1 in weirdo(1)
print('OK')

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

Instead raises Reference Error:

ReferenceError: NoneNone is not defined @ 
http://www.brython.info/py_classes.js:263

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.
works fine in Brython version 1.0.20130214-215612

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

GoogleCodeExporter commented 9 years ago
Thanks again, fixed in revision 520

Original comment by pierre.q...@gmail.com on 17 Feb 2013 at 9:07

GoogleCodeExporter commented 9 years ago

Original comment by pierre.q...@gmail.com on 17 Feb 2013 at 9:07