On Wed, Jul 13, 2011 at 7:46 AM, rantingrick <rantingr...@gmail.com> wrote: >>>> [x for x in dir([]) if not x.startswith('_')] > ['append', 'count', 'extend', 'index', 'insert', 'pop', 'remove', > 'reverse', 'sort'] > > Because we have plenty of room for args in this function... > >>>> dir(verbose=False) > ['append', 'count', 'extend', 'index', 'insert', 'pop', 'remove', > 'reverse', 'sort'] >
#define my_dir(o,verbose) verbose?dir(o):[x for x in dir(o) if not x.startswith('_')] And there you are, out of your difficulty at once. Granted, you now have to run your code through cpp, but is that so big a problem? ChrisA (For the sarcasm-impaired: I am NOT advocating this.) -- http://mail.python.org/mailman/listinfo/python-list