Re: any way to tell at runtime whether a callable is implemented in Python or C ?

2014-09-26 Thread Terry Reedy
On 9/26/2014 12:10 PM, Ian Kelly wrote: On Fri, Sep 26, 2014 at 6:12 AM, Stefan Behnel wrote: On Fri, Sep 26, 2014 at 5:47 PM, Wolfgang Maier wrote: is there any reliable and inexpensive way to inspect a callable from running Python code to learn whether it is implemented in Python or C befo

Re: any way to tell at runtime whether a callable is implemented in Python or C ?

2014-09-26 Thread Ian Kelly
On Fri, Sep 26, 2014 at 6:12 AM, Stefan Behnel wrote: > Chris Angelico schrieb am 26.09.2014 um 10:42: >> On Fri, Sep 26, 2014 at 5:47 PM, Wolfgang Maier wrote: >>> is there any reliable and inexpensive way to inspect a callable from running >>> Python code to learn whether it is implemented in Py

Re: any way to tell at runtime whether a callable is implemented in Python or C ?

2014-09-26 Thread Stefan Behnel
Chris Angelico schrieb am 26.09.2014 um 10:42: > On Fri, Sep 26, 2014 at 5:47 PM, Wolfgang Maier wrote: >> is there any reliable and inexpensive way to inspect a callable from running >> Python code to learn whether it is implemented in Python or C before calling >> into it ? > > I'm not sure you

Re: any way to tell at runtime whether a callable is implemented in Python or C ?

2014-09-26 Thread Chris Angelico
On Fri, Sep 26, 2014 at 5:47 PM, Wolfgang Maier wrote: > Hi, > is there any reliable and inexpensive way to inspect a callable from running > Python code to learn whether it is implemented in Python or C before calling > into it ? I'm not sure you can say for absolute certain, but the presence of

Re: any way to tell at runtime whether a callable is implemented in Python or C ?

2014-09-26 Thread Stefan Behnel
Wolfgang Maier schrieb am 26.09.2014 um 09:47: > is there any reliable and inexpensive way to inspect a callable from > running Python code to learn whether it is implemented in Python or C > before calling into it ? Not really. Both can have very different types and very different interfaces. The

any way to tell at runtime whether a callable is implemented in Python or C ?

2014-09-26 Thread Wolfgang Maier
Hi, is there any reliable and inexpensive way to inspect a callable from running Python code to learn whether it is implemented in Python or C before calling into it ? Thanks, Wolfgang -- https://mail.python.org/mailman/listinfo/python-list