[IPython-dev] Overzealous introspection

Pauli Virtanen pav@iki...
Fri Jan 23 11:26:18 CST 2009


Fri, 23 Jan 2009 16:31:14 +0200, Ville M. Vainio wrote:

> On Fri, Jan 23, 2009 at 3:15 PM, Mike Hansen <mhansen@gmail.com> wrote:
> 
>> In [1]: def foo(x):
>>   ...:     """
>>   ...:     Eh?
>> Object `Eh` not found.
>>   ...:     """
>>   ...:     return 4
>>   ...:
>>
>> The function still gets defined.  I've verified that this is still an
> 
> Eh? gets converted to valid python code, hence the function gets
> defined. I don't think this is a bug.

I think the bug is the "Object `Eh` not found." message. The string "Eh?" 
occurs as a string literal and IMHO IPython shouldn't try to look it up.

-- 
Pauli Virtanen



More information about the IPython-dev mailing list