? parsing trouble #10694

Open
jdemeyer opened this Issue Jul 7, 2017 · 0 comments

Comments

Projects
None yet
1 participant
Contributor

jdemeyer commented Jul 7, 2017

It seems that the parsing of ? can only deal with certain simple expressions. I see no fundamental reason for this, it should work for arbitrary expressions.

The simplest example I can think of:

Python 2.7.13 (default, Jun 26 2017, 11:37:17) 
Type "copyright", "credits" or "license" for more information.

IPython 5.4.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: "x".__add__?
Object `__add__` not found.

versus

In [2]: s = "x"

In [3]: s.__add__?
Type:        method-wrapper
String form: <method-wrapper '__add__' of str object at 0x7f1efd1cbd28>
Docstring:   x.__add__(y) <==> x+y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment