You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from control.item import TestA, TestB
class TestApp():
def __init__(self):
self.tA = TestA(id="A")
self.tB = TestB(id="B")
self.tA.out()
self.tB.out()
x = TestApp()
control/item.pyj:
class TestA():
def __init__(self, id):
self.id = id
def out(self):
console.log(self.id)
class TestB(TestA):
pass
Running test.jsresults in
A
[Object: null prototype] { id: 'B', [Symbol(kwargs-object)]: true }
... expressing that there's an issue with self.id in TestB.
Walking through the code I'm convinced this is due to the fact that
a) TestB is missing the __argnames__ definition that should have been inherited from TestA ...
b) ρσ_interpolate_kwargs thus executes the !f.__argnames__ case ...
function ρσ_interpolate_kwargs(f, supplied_args) {
var has_prop, kwobj, args, prop;
if (!f.__argnames__) {
return f.apply(this, supplied_args);
}
has_prop = Object.prototype.hasOwnProperty;
kwobj = supplied_args.pop();
c) and wrongly packs the provided parameters into arguments:
TestA/arguments at the end of ρσ_interpolate_kwargs:
TestB/argumentsat the end of ρσ_interpolate_kwargs:
Consequentially the initialization of self.id in TestB pulls the wrong parameter - generating the issue indicated.
The text was updated successfully, but these errors were encountered:
The (familiar) setup:
app/__init__.pyj
:control/item.pyj
:Running
test.js
results in... expressing that there's an issue with
self.id
inTestB
.Walking through the code I'm convinced this is due to the fact that
a)
TestB
is missing the__argnames__
definition that should have been inherited fromTestA
...b)
ρσ_interpolate_kwargs
thus executes the!f.__argnames__
case ...c) and wrongly packs the provided parameters into
arguments
:TestA/arguments
at the end ofρσ_interpolate_kwargs
:TestB/arguments
at the end ofρσ_interpolate_kwargs
:Consequentially the initialization of
self.id
inTestB
pulls the wrong parameter - generating the issue indicated.The text was updated successfully, but these errors were encountered: