[IPython-dev] Overzealous introspection

Pauli Virtanen pav at iki.fi
Fri Jan 23 12:26:18 EST 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 at 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