Carsten Haese <[EMAIL PROTECTED]> wrote:

> It comes from the 'new' module:
> 
>>>> import new
>>>> help(new.function)
> Help on class function in module __builtin__:
> ...
> 
> Oddly enough, the help misrepresents which module the function is coming
> from.

No, I don't think it is misrepresenting anything. The 'new' module simply 
exposes names for some things which don't otherwise  have names, none of 
the types accessible through that module are actually defined there.

The class 'function' is a builtin definition, but by default it isn't bound 
to any name accessible to the Python interpreter. If you do:

>>> def f(): pass

>>> type(f).__module__
'__builtin__'
>>> help(type(f))
Help on class function in module __builtin__:
... etc ...

then the help makes a bit more sense.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to