hide object property from dir() function?

jerryji jerryji1976 at gmail.com
Mon Jan 14 22:20:12 CET 2008


Sorry for this newbie question, I was puzzled why the existing
property of an object is not shown in the dir() function output.

"v" is an lxml Element object variable --

In [44]: v
Out[44]: <Element 'documentProperties' at 0x8363cf8>

In [45]: dir(v)

dir() output doesn't contain the ".tag", which does exist --

In [46]: v.tag
Out[46]: 'documentProperties'

what is the rule governing the display of a property from dir()?

Many thanks in advance!


More information about the Python-list mailing list