Message1850
When a method is reflected from a class without making
an instance of that class, the type of the method is 'method' for methods from Python classes and 'reflectedfunction' for methods from Java classes.
Jython 2.2rc3 on java1.6.0_01
Type "copyright", "credits" or "license" for more information.
>>> from java.lang import String
>>> type(String.indexOf), type(String().indexOf)
(<type 'reflectedfunction'>, <type 'method'>)
>>> from urllib import URLopener
>>> type(URLopener.open_http),type(URLopener().open_http)
(<type 'method'>, <type 'method'>)
And in Python:
Python 2.5.1 (r251:54863, May 18 2007, 16:56:43)
[GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from urllib import URLopener
>>> type(URLopener.open_http), type(URLopener().open_http)
(<type 'instancemethod'>, <type 'instancemethod'>)
>>> |
|
Date |
User |
Action |
Args |
2008-02-20 17:17:59 | admin | link | issue1777567 messages |
2008-02-20 17:17:59 | admin | create | |
|