Open GoogleCodeExporter opened 8 years ago
Unfortunately, there's not an obvious mapping from all Python types to a JS
type.
That's the reason that there is the different .v types in the first place.
Seems useful for str and list though, I'll try to come up with a useful way to
do
something here.
Original comment by sgraham
on 9 Sep 2009 at 12:02
if you are interested here is a working dict to js function (implemented in js):
jsdict = function(dict) {
var ret = {};
dict.iter$(function(k, v){
ret[repr(k).v] = v.v;
});
return ret;
}
Original comment by jonathan.schemoul
on 9 Sep 2009 at 12:52
Two other snippets that work around some of this problems for me are:
Object.prototype.__setattr__ = function(attr, value) { this[attr] = value; }
Str$.prototype.toString = function() { return this.v; };
Original comment by cesar.iz...@gmail.com
on 15 Mar 2010 at 7:45
vvbvnvv
Original comment by fortheco...@gmail.com
on 1 Nov 2012 at 8:40
Original issue reported on code.google.com by
jonathan.schemoul
on 8 Sep 2009 at 8:18