
Steven D'Aprano <steve@pearwood.info> writes:
Nick Coghlan wrote:
On Thu, Jun 30, 2011 at 11:27 PM, Sturla Molden <sturla@molden.no> wrote:
What I am asking is if the need to filter the output from dir is so common that it could warrant a change to Python?
No, if an object is complicated enough that pprint(dir(obj)) and help(obj) aren't adequate to explore it, then it is time to go read the documentation (or the source, if the documentation is lacking).
Do you think that *reading the source* is to be preferred over a simple tool like running a filter over the output of dir()? I'm not exactly sure what point you're trying to make, but I don't think it's a good one.
I understood Nick's meaning to entail that in such a circumstance where usage for a complex object is difficult to discover, the solution isn't to alter Python but to address the poor documentation and/or poor design of those complex objects. But that might be because that's *my* position. -- \ “[F]reedom of speech does not entail freedom to have your ideas | `\ accepted by governments and incorporated into law and policy.” | _o__) —Russell Blackford, 2010-03-06 | Ben Finney