[Numpy-discussion] attribute names on record arrays

Travis Oliphant oliphant at ee.byu.edu
Wed Jun 13 14:36:08 EDT 2007


John Hunter wrote:

>I fund myself using record arrays more and more, and feature missing
>is the ability to do tab completion on attribute names in ipython,
>presumably because you are using a dict under the hood and __getattr__
>to resolve
>
>o.key
>
>where o is a record array and key is a field name.
>
>How hard would it be to populate __dict__ with the attribute names so
>we could tab complete on them?
>  
>

Not hard, in fact somebody suggested a patch that does exactly that.

The only question is what impact that might have on other things.   For 
example, I think we would have to make sure that the proper order for 
fields that conflict with object attributes would be (I'd have to look 
to remember what the current order is).

-Travis




More information about the NumPy-Discussion mailing list