Message1389

Author leouserz
Recipients
Date 2007-01-18.19:06:58
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
I ran into this will inspecting test_inspect and saw one of the errors thrown was this problem:

import types

bim = types.BuiltinMethodType
print bim
bim2 = types.BuiltinFunctionType
print bim2
print bim == bim2

print type(list.append)

a = type([].append)
print a

print a == bim
assert a== bim, "not a BuiltinMethodType"

running in python gives us this output:
python testbuiltins.py
<type 'builtin_function_or_method'>
<type 'builtin_function_or_method'>
1
<type 'method_descriptor'>
<type 'builtin_function_or_method'>
1

while in jython we get:
jython testbuiltins.py
<type 'method'>
<type 'reflectedfunction'>
0
<type 'methoddescr'>
<type 'list$1exposed_append'>
0
Traceback (innermost last):
  File "testbuiltins.py", line 15, in ?
AssertionError: not a BuiltinMethodType


leouser
History
Date User Action Args
2008-02-20 17:17:40adminlinkissue1638882 messages
2008-02-20 17:17:40admincreate