[IPython-User] Tab completion doesn't work on class/instance where __getattr__ has been overridden

Jörgen Stenarson jorgen.stenarson@bostream...
Wed Mar 2 12:15:59 CST 2011


Jeremy Conlin skrev 2011-03-02 15:28:
> I am using iPython 0.10.1 with Python 2.7.1.  I have created a minimal
> example which is copied below.  On my system, iPython does not tab
> complete the instance of myList.
>
> Jeremy
>
>
Your example code seems to work for me on python 2.6.4 and ipython 0.10.1

/Jörgen

C:\python\bugreports>python -m ipython
Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)]
Type "copyright", "credits" or "license" for more information.

IPython 0.10.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'. ?object also works, ?? prints more.

In [1]: %run tabcomplete_attr.py

I'm tesing out custom slicing.


In [2]: myList.
myList.__add__             myList.__rmul__
myList.__class__           myList.__setattr__
myList.__contains__        myList.__setitem__
myList.__delattr__         myList.__setslice__
myList.__delitem__         myList.__sizeof__
myList.__delslice__        myList.__str__
myList.__dict__            myList.__subclasshook__
myList.__dir__             myList.__weakref__
myList.__doc__             myList.append
myList.__eq__              myList.count
myList.__format__          myList.extend
myList.__ge__              myList.index
myList.__getattr__         myList.insert
myList.__getattribute__    myList.pop
myList.__getitem__         myList.remove
myList.__getslice__        myList.reverse
myList.__gt__              myList.sort
myList.__hash__            myList.__abstractmethods__
myList.__iadd__            myList.__base__
myList.__imul__            myList.__bases__
myList.__init__            myList.__basicsize__
myList.__iter__            myList.__call__
myList.__le__              myList.__cmp__
myList.__len__             myList.__dictoffset__
myList.__lt__              myList.__flags__
myList.__module__          myList.__instancecheck__
myList.__mul__             myList.__itemsize__
myList.__ne__              myList.__mro__
myList.__new__             myList.__name__
myList.__reduce__          myList.__subclasscheck__
myList.__reduce_ex__       myList.__subclasses__
myList.__repr__            myList.__weakrefoffset__
myList.__reversed__        myList.mro


More information about the IPython-User mailing list