Supply condition in function call

Chris Angelico rosuav at gmail.com
Sat Mar 28 03:45:35 EDT 2015


On Sat, Mar 28, 2015 at 6:32 PM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
>>  |  Methods defined here:
>
> This is the usual guff that help() prints when you pass it a class or type.
> Occasionally it is useful. Often it is not, especially the dunder methods.
>
> Unfortunately help's UI is rather primitive. It would be nice if it provided
> a menu of commands whereby you could hide/show dunders (hidden by default,
> perhaps), but that's an order of magnitude more complexity. It might make a
> nice third-party tool though.

This is why I would never point someone to help() as a means of
primary learning. It's great for quickly checking a function's
parameters (especially their order) when you already know what it
does. Otherwise, how do you know what to call help() on? Much more
useful to start with the online module docs, which are searchable
(unlike help(modulename), broadly speaking), and which omit all the
dunders.

ChrisA



More information about the Python-list mailing list