Blackbird <[EMAIL PROTECTED]> skrev:
>>
> Is the interpreter in fact using repr(), or parts of it, to generate
> output when you type an expression at the command prompt? The
> results sure look similar.
Let me clarify this: The interpreter uses eval. No doubt about that. But
>>> eval('f')
<function f at 0x0128CFB0>
>>> repr(f)
'<function f at 0x0128CFB0>'
So there is still a connection between eval and repr that I don't fully
understand, besides the fact that eval (among other things) is the inverse
of repr. Do they share some code, and if so, what part? Well, I guess I
could of course take a few weeks off and dive into the source... not sure my
wife would approve..
--
http://mail.python.org/mailman/listinfo/python-list