Peter Hansen wrote: > [...]> > On the other hand, if 'something' is actually some arbitrary object, > then it's definitely not always true, especially for anything not > built in to Python. > > -Peter
Yes, I had strings in mind. And I guess it will work with the other primitive types, but anything that repr to something like '<function f at 0x0128CFB0>' will crash, since it's not a valid Python expression. 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. Blackbird -- http://mail.python.org/mailman/listinfo/python-list