Hi there,
I at the moment port a library from Python to Jython (at lease I try to
do so :-))). The library uses the Rexec to form a type adapter to cast
parameters given as text into the according Jython type. I learned
rexec is not available in Jython. Is something that is commonly used in
Jython
Hi there,
I at the moment port a library from Python to Jython (at lease I try to
do so :-))). The library uses the Rexec to form a type adapter to cast
parameters given as text into the according Jython type. I learned
rexec is not available in Jython. Is something that is commonly used in
Jython
sorry for the double post!
It is the r_eval() functionality of the rexec module I am looking
forward to replace
--
http://mail.python.org/mailman/listinfo/python-list
this is really funny...
I tried to use eval(String) as an replacement. It works now but the
calculation results from my tests are not as expected: 2 + 3 = 23 !!! 2
- 3 = 2-3...
I have the feeling that there is a really easy solution for this.
Unfortunately I have no enough experience
--
Mark Fink wrote:
this is really funny...
I tried to use eval(String) as an replacement. It works now but the
calculation results from my tests are not as expected: 2 + 3 = 23 !!! 2
- 3 = 2-3...
I have the feeling that there is a really easy solution for this.
Unfortunately I have no enough
This is the original code section of the library including the
comments:
class AutoAdapter(TypeAdapter):
This adapter returns a type based on the format of the table cell
contents, following python's rules for literals (plus a few
others).
We could fall back on this when we don't
Mark Fink wrote:
This is the original code section of the library including the
comments:
class AutoAdapter(TypeAdapter):
This adapter returns a type based on the format of the table cell
contents, following python's rules for literals (plus a few
others).
We could fall
:-))) it works!
I replaced it to return eval(s) and the results look extremely well
guess I should get one of this crystal balls myself.
one minor issue is still left:
correct me if I am wrong: result of 2/-3 is 0 (at least this is how it
is defined in the testcase)
In Jython 2.1.3:
2/-3
-1