ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> Jython-dev
Jython-dev
[Jython-dev] BuiltinFunctionType does not work
by Don Coleman other posts by this author
Apr 28 2003 6:12PM messages near this date
[Jython-dev] __doc__ string for Jython builtins | Re: [Jython-dev] Install failure on mac os x
BuiltinFunctionType does not seem to work for Jython. 

Jython 2.1
> >> import types
> >> isinstance(len, types.BuiltinFunctionType)
0
> >> isinstance(len, types.BuiltinMethodType)
0

Python 2.2.2
> >> import types
> >> isinstance(len, types.BuiltinFunctionType)
1
> >> isinstance(len, types.BuiltinMethodType)
1

What is the proper check to find out if an object is a builtin method? 

> >> import org.python.core
> >> isinstance(len, org.python.core.BuiltinFunctions)
1

This code works in Jython but not Python.  Is there a portable way to do
this?





-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jython-dev mailing list
Jython-dev@[...].net
https://lists.sourceforge.net/lists/listinfo/jython-dev

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved