super().__init__() using keyword args misassigns args #434

Closed
pyjsorg opened this Issue Apr 27, 2012 · 2 comments

Projects

None yet

1 participant

@pyjsorg
Contributor
pyjsorg commented Apr 27, 2012

What steps will reproduce the problem?

  1. Compile and Run this
    class A1(object) :
    def init(self,a=None,b=None,c=None) :
    self.a1_args = [('a', a),('b',b),('c',c)]

class A2(A1) :
def init(self,a=None,b=None,c=None) :
self.a2_args = [('a', a),('b',b),('c',c)]
super(A2,self).init(a=a,b=b,c=c)

class A3(A1) :
def init(self,a=None,b=None,c=None) :
self.a3_args = [('a', a),('b',b),('c',c)]
super(A3,self).init(a,b,c)

a2 = A2(a=1,b=2,c=3)
a3 = A3(a=1,b=2,c=3)
Window.alert([("A2",a2.a1_args),("A3",a3.a1_args)])

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

Expect:
[('A2', [('a', 1), ('b', 2), ('c', 3)]),
('A3', [('a', 1), ('b', 2), ('c', 3)])]

Get:
[('A2', [('a', null), ('b', 1), ('c', 2)]),
('A3', [('a', 1), ('b', 2), ('c', 3)])]

What version of Pyjamas are you using? which svn revision number?
On what operating system?

pyjamas-0.6
Linux bozo 2.6.18-92.1.22.el5PAE #1 SMP Tue Dec 16 12:36:25 EST 2008 i686
i686 i386 GNU/Linux

No Stack traces produced.

If using PyJS, what compiler options did you use?

pyjamas-0.6/bin/pyjsbuild -d

Please provide any additional information below.

Original issue: http://code.google.com/p/pyjamas/issues/detail?id=285 (September 22, 2009 00:52:28)

@pyjsorg pyjsorg closed this Apr 27, 2012
@pyjsorg
Contributor
pyjsorg commented Apr 27, 2012

From cornelis...@gmail.com on September 22, 2009 06:38:57:
Thanks a lot. I added your test to the libtests (ClassTest.py) and solved the issue
(r1865).

@pyjsorg
Contributor
pyjsorg commented Apr 27, 2012

From luke.lei...@gmail.com on September 22, 2009 13:33:03:
good stuff, todd. very helpful. thanks kees.

@pyjsorg pyjsorg pushed a commit that referenced this issue Apr 29, 2012
Daniel Kluev Moved pyjslib.slice to pyjslib.__getslice as per #582, #364, #577, #434
…, #496
d798191
@pyjsorg pyjsorg pushed a commit that referenced this issue Apr 29, 2012
Daniel Kluev Implemented Sliceobj and slice bltin as per #582, #364, #577, #434, #496
b5d29a9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment