On Mon, Feb 07, 2005 at 03:24:11PM +0100, Alex Martelli wrote: > def always produces a > function object and binds it to the name coming after keyword 'def'. > Any such function object, no matter how produced and how bound hither > and thither, always behaves in exactly the same way.
This isn't exactly true: >>> class C(object): ... def __new__(*a): pass ... >>> C.__new__ <function __new__ at 0x40088d4c> >>> class D(object): pass ... >>> def __new__(*a): pass ... >>> D.__new__ = __new__ >>> D.__new__ <unbound method D.__new__> of course, __new__ is special-cased (*some*body should've read "import this", especially the part "explicit is better than implicit"). -- John Lenton ([EMAIL PROTECTED]) -- Random fortune: Al freír será el reír.
signature.asc
Description: Digital signature
-- http://mail.python.org/mailman/listinfo/python-list