suyashdb / pydicom

Automatically exported from code.google.com/p/pydicom
0 stars 0 forks source link

Dataset.__dir__() doesn't list instance methods #95

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
For exploring, it'd be really nice if:

>>> d = dicom.read_file("foo.dcm")
>>> dir(d)

listed methods like data_element() and pixel_array(). Currently, it only lists 
tag names.

Somehow, though, IPython's tab completion finds pixel_array() and other 
methods, despite trait_names() returning dir(). Maybe IPython does its own 
inspection now?

Original issue reported on code.google.com by njv...@gmail.com on 3 Dec 2010 at 6:54

GoogleCodeExporter commented 8 years ago
Agreed. I had thought the method names were somehow returned by python. 
Evidently not. But this may differ by python version -- needs a little 
investigation.

One other disturbing finding. Typing something like:
>>>d.data_element
which should return '<bound method...>' instead returns a list of the data 
elements, as if one had type "d". This is also true of inherited methods from 
the parent dict object.

Original comment by darcymason@gmail.com on 4 Dec 2010 at 1:17

GoogleCodeExporter commented 8 years ago
This issue was closed by revision a0bbac406d1a.

Original comment by darcymason@gmail.com on 18 Dec 2011 at 7:36