[Tutor] eval weirdness
Poor Yorick
gp@pooryorick.com
Sat Nov 30 13:03:03 2002
Gregor Lingl wrote:
>>
>>
>>
>
> Hmmm, strange! I' curious, too!
> BTW:
>
> >>> what = __builtins__.__dict__['help']
> >>> what
> Type help() for interactive help, or help(object) for help about object.
> >>> type(what)
> <type 'instance'>
> >>>
>
> Which class is what an instance of?
> Gregor
Or, to keep things simple, what class is "help" an instance of, since
what is just another identifier, as the id function shows:
>>> what = __builtins__.__dict__['help']
>>> what
Type help() for interactive help, or help(object) for help about object.
>>> type(what)
<type 'instance'>
>>> id(what)
7654824
>>> id(help)
7654824
>>>
Poor Yorick
gp@pooryorick.com