TypeError: bad argument type for built-in operation
-
Paul J. Davis
Most odd. Nothing comes to mind off the top of my head. I'll take a
closer look when I get home tonight.Thanks for the report.
-
seb
I fixed the bug.
git://github.com/spahl/python-spidermonkey.git
There is still a problem left, it doesn't work in this case:
test = {1.1 : 0} test[1.1]ps: sorry for the formatting in the first bug report:-)
-
Paul J. Davis
seb,
Now that you tracked that down I realize that the error is that I was
being a moron and only allowing string values as keys there. When I
get home I'll update to only do the utf8 dance if it's a string
otherwise just take the key as is.Thanks for the follow up on this.
Paul
-
Paul J. Davis
- State changed from new to resolved
(from [e75f991342e41d62647aa5f557eaff784598ff4b]) Fix integer property lookups.
>>> rt = spidermonkey.Runtime() >>> cx = rt.new_context() >>> cx.add_global("bang", [2, "got me!"]) >>> assert cx.execute("bang[1];") == "got me!"Thanks to spahl for the report and fix.
[#16 TypeError: bad argument type for built-in operation state:resolved] http://github.com/davisp/python-spidermonkey/commit/e75f991342e41d6...
-
Paul J. Davis
I should've mentioned in the commit, but property access by anything other than an integer or string won't work as Spidermonkey will convert anything else to a string before it reaches Python.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.