Issue1223
Created on 2009-01-08.14:54:15 by pekka.klarck, last changed 2010-04-11.00:18:31 by pjenvey.
msg4016 (view) |
Author: Pekka Klärck (pekka.klarck) |
Date: 2009-01-08.14:54:15 |
|
Jython 2.2 on java1.6.0_03
Type "copyright", "credits" or "license" for more information.
>>> import inspect
>>> from java.lang import String
>>> inspect.isroutine(String.toUpperCase)
0
>>> inspect.isroutine(str.upper)
1
>>> inspect.isroutine(String().toUpperCase)
1
>>> inspect.isroutine(str().upper)
1
>>> type(String.toUpperCase)
<type 'reflectedfunction'>
>>> type(str.upper)
<type 'methoddescr'>
>>> type(String().toUpperCase)
<type 'method'>
>>> type(str().upper)
<type 'builtin_function_or_method'>
It seems that PyReflectedFunction is not exposed correctly as a method.
We used this kind of a workaround:
def _isroutine(self, item):
return inspect.isroutine(item) \
or (utils.is_jython and isinstance(item, PyReflectedFunction))
|
msg4028 (view) |
Author: Pekka Klärck (pekka.klarck) |
Date: 2009-01-12.00:32:24 |
|
Same problem appears also with 2.5b1.
|
msg5056 (view) |
Author: Łukasz (lukaszd7) |
Date: 2009-08-18.09:18:19 |
|
I made some simple patch.
|
msg5654 (view) |
Author: Philip Jenvey (pjenvey) |
Date: 2010-04-11.00:18:30 |
|
This was actually already fixed in r6883
|
|
Date |
User |
Action |
Args |
2010-04-11 00:18:31 | pjenvey | set | status: open -> closed resolution: fixed messages:
+ msg5654 nosy:
+ pjenvey |
2009-08-18 09:18:21 | lukaszd7 | set | files:
+ issue1223_patch.patch keywords:
+ patch messages:
+ msg5056 nosy:
+ lukaszd7 |
2009-03-14 14:13:39 | fwierzbicki | set | priority: normal versions:
+ 2.5.1 |
2009-01-12 00:32:25 | pekka.klarck | set | messages:
+ msg4028 |
2009-01-08 14:54:15 | pekka.klarck | create | |
|