Re: <build-in function> incompatible with <function>
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: <build-in function> incompatible with <function>

From: gmane <emile@fenx.com>
Date: Tue Jan 31 2006 - 02:13:32 CET

"Luke" <luke@deller.id.au> wrote in message
news:1138669047.694626.283940@g49g2000cwa.googlegroups.com...
> Built-in functions don't bind to classes like regular functions. Is
> this intended? (I do notice that the Python Reference Manual sec 3.2
> under "Class Instance" refers to a "user-defined function"). Any ideas
> what the reason is for this distinction between build-in functions and
> normal functions?
>

no, but does this help...

>>> class Test:
... c = classmethod(abs)
...
>>> obj = Test()
>>> obj.c
<bound method classobj.abs of <class __main__.Test at 0x00B2C060>>
>>>

Emile
Received on Tue Feb 7 20:18:06 2006